We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 46586a4 commit 191464cCopy full SHA for 191464c
js/utils/events.js
@@ -13,9 +13,10 @@
13
(function(ionic) {
14
15
// Custom event polyfill
16
- ionic.CustomEvent = window.CustomEvent || (function() {
17
- var CustomEvent;
18
- CustomEvent = function(event, params) {
+ ionic.CustomEvent = (function() {
+ if( typeof window.CustomEvent === 'function' ) return CustomEvent;
+
19
+ var customEvent = function(event, params) {
20
var evt;
21
params = params || {
22
bubbles: false,
@@ -35,8 +36,8 @@
35
36
}
37
return evt;
38
- CustomEvent.prototype = window.Event.prototype;
39
- return CustomEvent;
+ customEvent.prototype = window.Event.prototype;
40
+ return customEvent;
41
})();
42
43
0 commit comments