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

use native classList functionality #11

Open
james2doyle opened this issue Dec 16, 2014 · 5 comments
Open

use native classList functionality #11

james2doyle opened this issue Dec 16, 2014 · 5 comments

Comments

@james2doyle
Copy link
Contributor

I noticed that there are some helper functions for manipulating classes.

I was wondering why, since classList is actually better supported than drag. Although, it looks like IE <= 9 doesn't support classList, but I am not sure how well they support drag either. As far as reasons why, it would probably be better performance and smaller code base to just use classList, on the downside, it would mean supporting IE > 9 only.

@bgrins
Copy link
Owner

bgrins commented Dec 16, 2014

IIRC, drag and drop has been supported since at least IE 5.5. But I haven't checked this library against older versions of IE in a while. It would be worth checking in <=8 to see if we are working right now It'd be a shame to break it if it was already working in these releases, but if it's already broken we could probably move on and use the newer stuff.

I don't think performance is a real consideration given how infrequently the class names are modified. If things are working in old IE. Although we could always modify the addClassName/hasClassName/removeClassName function to use the classList API if available.

@james2doyle
Copy link
Contributor Author

I just checked it in IE 8 and IE 9.

IE 8 says it has no addEventListener which is the attachEvent problem, and IE 9 wasn't working either, except when dragging an a tag (which is apparently a known issue), but it was also throwing an error on this line.

@bgrins
Copy link
Owner

bgrins commented Dec 16, 2014

IE 8 says it has no addEventListener which is the attachEvent problem

Oh right, addEventListener. I'd say we can go ahead and switch to classList in that case.

@bgrins
Copy link
Owner

bgrins commented Dec 16, 2014

IE 9 wasn't working either, except when dragging an a tag (which is apparently a known issue), but it was also throwing an error on this line.

What if we try/catch that line(s)? Will it work in IE9 in that case?

@james2doyle
Copy link
Contributor Author

It's possible. It seems like there might be more things than just the one line though.

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

2 participants