mirror of
https://github.com/jlengrand/webcomponentsjs.git
synced 2026-05-18 15:56:32 +00:00
Merge pull request #339 from jre-g/customevent-in-aosp-browser
Define CustomEvents shim wherever it's missing, not just in IE
This commit is contained in:
@@ -103,9 +103,9 @@ function bootstrap() {
|
||||
});
|
||||
}
|
||||
|
||||
// CustomEvent shim for IE <= 11
|
||||
// NOTE: we explicitly test for IE since Safari has a type `object` CustomEvent
|
||||
if (isIE && (typeof window.CustomEvent !== 'function')) {
|
||||
// CustomEvent shim
|
||||
// NOTE: we can't check that typeof isn't `function` since Safari has a type `object` CustomEvent
|
||||
if (!window.CustomEvent) {
|
||||
window.CustomEvent = function(inType, params) {
|
||||
params = params || {};
|
||||
var e = document.createEvent('CustomEvent');
|
||||
|
||||
@@ -26,9 +26,9 @@ if (scope.useNative) {
|
||||
return;
|
||||
}
|
||||
|
||||
// CustomEvent shim for IE
|
||||
// NOTE: we explicitly test for IE since Safari has an type `object` CustomEvent
|
||||
if (isIE && (typeof window.CustomEvent !== 'function')) {
|
||||
// CustomEvent shim
|
||||
// NOTE: we can't check that typeof isn't `function` since Safari has a type `object` CustomEvent
|
||||
if (!window.CustomEvent) {
|
||||
window.CustomEvent = function(inType, params) {
|
||||
params = params || {};
|
||||
var e = document.createEvent('CustomEvent');
|
||||
|
||||
Reference in New Issue
Block a user