Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
IE8 javascript hacks
function addEventListener(el, eventName, eventHandler) {
if (el.addEventListener){
el.addEventListener(eventName, eventHandler, false);
else if (el.attachEvent){
//ie8 does not support addEventListener
el.attachEvent('on'+eventName, eventHandler);
//IE8 does not support
if( ! { = function() {return new Date().getTime();};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.