Add polyfill for IE9 support of classList. Avoid depending on jQuery for trivial class manipulation.

https://developer.mozilla.org/en/DOM/element.classList
http://caniuse.com/classlist

CommentFileSizeAuthor
core-js-classList-polyfill.patch8.12 KBnod_

Comments

jessebeach’s picture

Rather than loading another polyfill, why not just use jQuery? I was just reading an article by a jQuery core dev about this issue:

http://blog.methvin.com/2013/12/please-stop-jsperfcom-abuse.html

And classList doesn't support multiple class manipulations in IE10 and IE11 (says one of the commenters in the article above).

nod_’s picture

Because the script doesn't require jQuery and it's the kind of script you could send anon users (if you decide to handle the active class in JS for anon).

No need for jQuery for this if there is no other requirements on it. Just read the post as well, doesn't apply when you don't use jQuery in the first place.

jessebeach’s picture

Fair point.

wim leers’s picture

+++ b/core/modules/system/system.module
@@ -1136,6 +1137,20 @@ function system_library_info() {
+  // classList polyfill for IE9

Missing trailing period.

That's the only nitpick I could find.

Other than that, I think this is good to go.

nod_’s picture

Status: Needs review » Closed (duplicate)

parent has been rolled back, put this in new patch.