UNPKG

dotcms

Version:

This library allows you to interact with DotCMS API's easily from the browser, nodejs and React Native. [Full Documentation](https://dotcms.github.io/core-web/dotcms/)

20 lines 580 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DotApiEvent = void 0; /** * Emit custom events for the DotCMS Edit Mode * */ class DotApiEvent { emit(params) { const { name, data } = params; const customEvent = window.top.document.createEvent('CustomEvent'); customEvent.initCustomEvent('ng-event', false, false, { name: name, data: data }); window.top.document.dispatchEvent(customEvent); } } exports.DotApiEvent = DotApiEvent; //# sourceMappingURL=DotApiEvent.js.map