Skip to content

Commit

Permalink
Call CustomEvent constructor instead of Event.
Browse files Browse the repository at this point in the history
  • Loading branch information
Garbee committed May 17, 2016
1 parent f67fafd commit 313a350
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mdlComponentHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ componentHandler = (function() {

var ev;
if ('CustomEvent' in window && typeof window.CustomEvent === 'function') {
ev = new Event('mdl-componentupgraded', {
ev = new CustomEvent('mdl-componentupgraded', {
bubbles: true, cancelable: false
});
} else {
Expand Down Expand Up @@ -360,7 +360,7 @@ componentHandler = (function() {

var ev;
if ('CustomEvent' in window && typeof window.CustomEvent === 'function') {
ev = new Event('mdl-componentdowngraded', {
ev = new CustomEvent('mdl-componentdowngraded', {
bubbles: true, cancelable: false
});
} else {
Expand Down

0 comments on commit 313a350

Please sign in to comment.