What is the equivalent to the Element Object in Internet Explorer 9?
if (!Element.prototype.addEventListener) { Element.prototype.addEventListener = func
I'm using this solution and works in IE8 or greater.
if (typeof Element.prototype.addEventListener === 'undefined') { Element.prototype.addEventListener = function (e, callback) { e = 'on' + e; return this.attachEvent(e, callback); }; }
And then:
Say Hello
This will work both IE8 and Chrome, Firefox, etc.