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.

No normalization of add/remove/toggle in IE10 and IE11

See original GitHub issue

I tested the polyfill in IE10 and IE11 (Win7 on a virtual machine) and the functions still have partial support of classList. Multiple parameters in the add() and remove() functions still don’t work.

    if (!("classList" in document.createElement("_"))
        || document.createElementNS && !("classList" in document.createElementNS("http://www.w3.org/2000/svg", "g"))) {

The last condition !("classList" in document.createElementNS("http://www.w3.org/2000/svg", "g")) evaluates to true, so the part for no classlist support will be executed. The part for partial classlist supported browsers won’t be executed in IE10/11.

I could “fix” the issue by changing || to && in line18/19:

    if (!("classList" in document.createElement("_"))
        && document.createElementNS && !("classList" in document.createElementNS("http://www.w3.org/2000/svg", "g"))) {

It seems to work for IE10/11, but don’t know if is could be an issue for other browsers.

Issue Analytics

  • State:open
  • Created 8 years ago
  • Reactions:4
  • Comments:17

github_iconTop GitHub Comments

3reactions
stevenvachoncommented, Aug 13, 2016

For anyone needing this, I have a pull request in, but since that will probably never get merged, you can point to my branch in your projects: https://github.com/stevenvachon/classList.js

2reactions
stevenvachoncommented, Aug 11, 2016

@eligrey are you deceased?

Read more comments on GitHub >

github_iconTop Results From Across the Web

IE11/10 multiple argument remove and add not working due to ...
Yes, you are correct this appears to be a duplicate of No normalization of add/remove/toggle in IE10 and IE11 #44 . My bad....
Read more >
To run as IE10 instead of IE11 in Windows-10 Pro
We have our IE11 versioned internal browser. Our application will be working perfectly in IE11 Browser but it is not supported in IE10....
Read more >
Why Does IE11 Handle Node.normalize() Incorrectly for the ...
The other answers here are somewhat verbose and incomplete — they do not walk the full DOM sub-tree. Here's a more comprehensive solution:...
Read more >
Ending Support for Tags in Internet Explorer 10 and 11
Adobe Experience Platform no longer provides update support for tags in Internet Explorer 10 and 11.
Read more >
How to turn off compatibility View / Mode in Microsoft IE10 and ...
"This browser/version is no longer supported. A minimum of Internet Explorer (IE) 10, Firefox 9 or Chrome 14 is required". When using IE...
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