Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
addition to shim CustomEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
Katochimoto committed Aug 2, 2014
1 parent d7889fe commit a63e327
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/boot.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,13 @@ function bootstrap() {

// CustomEvent shim for IE
if (typeof window.CustomEvent !== 'function') {
window.CustomEvent = function(inType) {
var e = document.createEvent('HTMLEvents');
e.initEvent(inType, true, true);
window.CustomEvent = function(inType, params) {
params = params || {};
var e = document.createEvent('CustomEvent');
e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail);
return e;
};
window.CustomEvent.prototype = window.Event.prototype;
}

// When loading at readyState complete time (or via flag), boot custom elements
Expand Down

0 comments on commit a63e327

Please sign in to comment.