Skip to content

Commit

Permalink
ENGCOM-3647: [Backport] chore: remove old code for IE9 #19667
Browse files Browse the repository at this point in the history
  • Loading branch information
sidolov authored Feb 4, 2019
2 parents 49883b7 + 597ebdf commit 9bd2e6a
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions lib/web/varien/js.js
Original file line number Diff line number Diff line change
Expand Up @@ -607,17 +607,11 @@ if (!("console" in window) || !("firebug" in console))
* @example fireEvent($('my-input', 'click'));
*/
function fireEvent(element, event) {
if (document.createEvent) {
// dispatch for all browsers except IE before version 9
var evt = document.createEvent('HTMLEvents');
// dispatch event
var evt = document.createEvent('HTMLEvents');

evt.initEvent(event, true, true); // event type, bubbling, cancelable
return element.dispatchEvent(evt);
}
// dispatch for IE before version 9
var evt = document.createEventObject();

return element.fireEvent('on' + event, evt);
evt.initEvent(event, true, true); // event type, bubbling, cancelable
return element.dispatchEvent(evt);

}

Expand Down

0 comments on commit 9bd2e6a

Please sign in to comment.