Extracting custom event creation into a util module

This commit is contained in:
Jeff Avallone committed 2014-12-19 10:24:45 -05:00
1 parent 0d6e272216
commit 78917d44e6
6 files changed
+37 -21

No files matched your search

+6
View File
@@ -0,0 +1,6 @@
export function customEvent(name, detail) {
var evt = document.createEvent('Event');
evt.initEvent(name, true, true);
evt.detail = detail;
return evt;
}