I am looking for a way to do node.classList.contains("foo")
in Internet Exploder 7-9 without needing to refactor major portions of my code. This method is present in all other browsers (even IE10).
I have found Code with classList does not work in IE? but I dont understand how I would use this for replacing the .contains()
method.
I already do have code that let's me run isolated code for certain browsers only, so giving IE some extra or different code isn't a problem.
Is there a way to add said method via classList
's prototype or some other handy way to work with className
?