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
 - Merge Pull Request #19331 from DanielRuf/magento2:chore/lib-varien-remove-ie9-code
 - Merged commits:
   1. 486aead
  • Loading branch information
magento-engcom-team committed Nov 22, 2018
2 parents 1a805d0 + 486aead commit 7860d87
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 7860d87

Please sign in to comment.