Skip to content

Commit

Permalink
ENGCOM-3522: chore: remove old code for IE9 #19331
Browse files Browse the repository at this point in the history
  • Loading branch information
sidolov authored Dec 6, 2018
2 parents f857db1 + 7860d87 commit 23994fd
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 23994fd

Please sign in to comment.