@awcrotwell/motion
Version:
Motion allows you to build reactive, real-time frontend UI components in your Amber application using pure Crystal that are reusable, testable & encapsulated. For brevity, we will call them MotionComponents.
18 lines (17 loc) • 490 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
function dispatchEvent(target, name) {
try {
const event = new CustomEvent(name, {
bubbles: true,
cancelable: false,
});
// debugger
target.dispatchEvent(event);
}
catch (error) {
// eslint-disable-next-line no-console
console.error('Error while dispatching', name, 'on', target, error);
}
}
exports.default = dispatchEvent;