
08-25-2009
|
|
|
|
IE DOM parser bug?
Hello,
I got a piece of HTML that crashes IE8 developer tools. See attachment.
Extract the bug.html from the attachment, open it with IE8 then press F12.
Wait several seconds, IE8 crashes.
It seems IE6~8 DOM parsers are the same. Deadloop occurs
while traversing DOM tree with javascript, something
like following snippet.
function fTraverseDOMTree(obj, level) {
if (obj != null) {
:
var i = 0;
var nextObj = obj.childNodes[i];
while (nextObj) {
fTraverseDOMTree(nextObj, level + 1);
i++;
nextObj = obj.childNodes[i];
}
}
:
}
Is it the IE bug? How to avoid DOM element walker dead-loop?
lu0
|