patashala/style/cms/bower_components/dragula.js/test/lib/events.js
Vivek a53135a78d Added based code
Added base code to the repo
2024-02-07 20:19:28 +05:30

17 lines
297 B
JavaScript
Executable File

'use strict';
function raise (el, type, options) {
var o = options || {};
var e = document.createEvent('Event');
e.initEvent(type, true, true);
Object.keys(o).forEach(apply);
el.dispatchEvent(e);
function apply (key) {
e[key] = o[key];
}
}
module.exports = {
raise: raise
};