creativelive / appear

execute callbacks when dom elements appear in and out of view
http://creativelive.github.io/appear/
MIT License
177 stars 43 forks source link

<ie9 support? #4

Closed ryanjadhav closed 9 years ago

ryanjadhav commented 9 years ago

Currently we're using window.addEventListener in this project. To support older versions of IE (<IE9) we should use a function like:

function addListener (eventType, cb) {
  if (addEventListener) {
    addEventListener(eventType, cb, false); 
  } else if (attachEvent)  {
    attachEvent(eventType, cb);
  }
}

function removeListener (eventType, cb) {
  if (removeEventListener) {
    removeEventListener(eventType, cb, false); 
  } else if (removeEvent)  {
    removeEvent(eventType, cb);
  }
}
ryanjadhav commented 9 years ago

do we want <ie9 support?

matthewhadley commented 9 years ago

There might also be changes needed in the track and viewable functions. When making appear I decided to support ie9 and up, but that's not explicitly stated and maybe it should