Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not working on IE8 #8

Open
nettuto opened this issue Jul 10, 2014 · 5 comments
Open

not working on IE8 #8

nettuto opened this issue Jul 10, 2014 · 5 comments

Comments

@nettuto
Copy link

nettuto commented Jul 10, 2014

Hi, thanks for this great work, butit seams that it's not working on IE8, so any suggestion?
Thanks

@bgrins
Copy link
Owner

bgrins commented Jul 17, 2014

Ah, I think it fails because it is using addEventListener instead of attachEvent. Could probably replace calls to addEventListener / removeEventListener with calls to something like this and I'm guessing it would work:

function addEvent(emitter, type, f) {
  if (emitter.addEventListener)
    emitter.addEventListener(type, f, false);
  else if (emitter.attachEvent)
    emitter.attachEvent("on" + type, f);
};

function removeEvent(emitter, type, f) {
  if (emitter.removeEventListener)
    emitter.removeEventListener(type, f, false);
  else if (emitter.detachEvent)
    emitter.detachEvent("on" + type, f);
};

@laukstein
Copy link

@bgrins, it does not fix all the legacy issues.

@bgrins
Copy link
Owner

bgrins commented Oct 7, 2014

@laukstein sorry, I won't have time to track down all of the issues myself but I could help if you or anyone else were interested in adding IE8 support

@laukstein
Copy link

@bgrins Yes, IE8 support is exactly for what I am looking right now. What are your advises on adding IE8 support in it without adding any library like jQuery, Mootools, etc.?

@bgrins
Copy link
Owner

bgrins commented Oct 7, 2014

@laukstein have you replaced the calls to addEventListener / removeEventListener with the sample functions above? If so, what are the next issues - is it working at all or completely broken? Throwing an exception or just silently failing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants