Skip to content
This repository was archived by the owner on Sep 20, 2019. It is now read-only.

Commit f9508eb

Browse files
committed
Merge pull request #405 from webcomponents/fix-broken-customevent-ie
Fix for broken CustomEvent shim in IE
2 parents d10d1b2 + 6a1a793 commit f9508eb

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/CustomElements/boot.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,7 @@ function bootstrap() {
104104
}
105105

106106
// CustomEvent shim
107-
// NOTE: we can't check that typeof isn't `function` since Safari has a type `object` CustomEvent
108-
if (!window.CustomEvent) {
107+
if (!window.CustomEvent || isIE && (typeof window.CustomEvent !== 'function')) {
109108
window.CustomEvent = function(inType, params) {
110109
params = params || {};
111110
var e = document.createEvent('CustomEvent');

src/HTMLImports/boot.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ if (scope.useNative) {
2727
}
2828

2929
// CustomEvent shim
30-
// NOTE: we can't check that typeof isn't `function` since Safari has a type `object` CustomEvent
31-
if (!window.CustomEvent) {
30+
if (!window.CustomEvent || isIE && (typeof window.CustomEvent !== 'function')) {
3231
window.CustomEvent = function(inType, params) {
3332
params = params || {};
3433
var e = document.createEvent('CustomEvent');

0 commit comments

Comments
 (0)