dtrum-react-kit
Version:
Dynatrace tools and react hooks collection
14 lines (13 loc) • 498 B
JavaScript
;
exports.__esModule = true;
exports.sendDtrumAction = void 0;
var sendDtrumAction = function (actionName, callback) {
var _a = window.dtrum, dtrum = _a === void 0 ? undefined : _a;
if (!dtrum)
return callback === null || callback === void 0 ? void 0 : callback();
var action = dtrum.enterAction(actionName);
callback === null || callback === void 0 ? void 0 : callback();
dtrum.leaveAction(action);
return;
};
exports.sendDtrumAction = sendDtrumAction;