question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Doesn't work in IE 8.0.7601.17514 / Win 7

See original GitHub issue

I’ve just tried your polyfill in the above version and it doesn’t work. It fails here: https://github.com/eligrey/classList.js/blob/master/classList.js#L174

Turns out the exception thrown isn’t what you were expecting. The exception has no number property. It is a TypeError stating that “getters & setters can not be defined on this javascript engine”.

Removing the condition if (ex.number === -0x7FF5EC54) { ... fixes the problem.

Issue Analytics

  • State:open
  • Created 9 years ago
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
eligreycommented, Jan 12, 2017

I’m super busy with my proprietary stuff and missed this a year ago. I merged #43 just now.

I’m sorry about this issue affecting any of you. Please tell me if the changes I have merged have fixed this issue for you.

1reaction
david-markcommented, Jan 12, 2017

What you had hold of initially was an ActiveX exception (the number is an HRESULT). Clearly IE 11 is no longer using ActiveX objects behind the scenes.

Might as well remove the check as it simply causes all other exceptions to fail silently. There’s really no way to deal with the exception anyway. What’s the point of having it enumerable in some browsers and not in others?

Realize this will never be a perfect imitation of classList. It’s simply an impossible task; for one, the array-like object returned is not live. Then there’s the unsolvable IE 8- issue at hand.

A “polyfill” that doesn’t actually work as expected only serves to deceive other scripts. It fools their feature detection into thinking that the feature is there, but it’s really just an incomplete imposter.

In general, DOM “polyfills” are highly ill-advised and this one is a good example of why. Better to write wrappers (e.g. hasClass, addClass, etc.)

Also note that transpiling is just a red herring here.

HTH

Read more comments on GitHub >

github_iconTop Results From Across the Web

internet explorer - How can you go from IE 8.0.7600.16385 to ...
Simple question: How can you upgrade Internet explorer from version 8.0.7600.16385 to version 8.0.7601.17514 on Windows 7? There doesn't ...
Read more >
I need to download Internet Explorer 8.0.7601.17514 for Win 7
Step 1: Disable the Internet Explorer 8: a. Go to Start and in the search type "Turn Windows features On or Off". b....
Read more >
Internet Explorer 8.0.7601.17514IC - Windows - OldVersion.com
Internet Explorer 8.0.7601.17514 IC ; Doesn't Work on: Windows Vista / Windows XP / Windows 2000 / Windows 98 / Windows 95 ;...
Read more >
How to get Internet Explorer 8.0.7601? - Stack Overflow
I read somewhere that IE 8.0.7601 is not available for download but it is IE 8 installed on Windows 7 Service Pack 1....
Read more >
IE driver - Does not set cookie · Issue #1227 - GitHub
addCookie(testCookie); does not work in IE driver. ... The same code works as expected in IE9, Chrome, and Firefox 7. ... Windows 7,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found