Last Updated: February 25, 2016
·
1.228K
· darhazer

IE8: do not use recursion when working with DOM

It seems IE8 has really small stack for recursion on global objects (and DOM is global). My use case is recursively getting children of a node and I got stackoverflow at simple HTML. After some research it looks like you can get only 12 levels deep so I rewrite it as iterative function. You can see the result here

Have a fresh tip? Share with Coderwall community!

Post
Post a tip
Did you know?

JavaScript on a page runs with the privileges of that origin. One altered library, tag manager, or snippet can read inputs, change what people see, and call your APIs as the user.

Security insights from Cside