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
Written by Maxim Krizhanovsky
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Dom
Authors
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
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#