Jhey Tompkins
1 min readMay 4, 2017

--

Hey andfinally

Thanks for pointing this out! You’re right, I hadn’t looked at this in IE 😅

The issue in IE was simply some of the NodeList/Node API support in IE.

I was doing something like;

const panels = document.querySelectorAll(panelClass)
panels.forEach((panel) => doSomething(panel))

And

const panel = document.querySelector(panelClass)
panel.remove()

IE doesn’t like this 👎

The fix? Simply to alter the code(I have done so in the demo 👍) to make use of for loops and parentNode.removeChild.

const panels = document.querySelectorAll(panelClass)
for(let p = 0; p < panels.length; p++) {
doSomething(panels[p])
}
const panel = document.querySelector(panelClass)
panel.parentNode.removeChild(panel)

Hopefully that helps! The pen should work as expected in IE now 🎉

--

--

Jhey Tompkins
Jhey Tompkins

Written by Jhey Tompkins

I make awesome things for awesome people!

No responses yet