This project is archived and is in readonly mode.

#37 ✓wontfix
Thomas Aylott

Safari 2 Crashes when accessing undefined property of childNodes

Reported by Thomas Aylott | May 28th, 2008 @ 10:05 AM

Originally posted on Trac by subtleGradient

Original Trac Ticket


This crashes Safari 2 on Leopeard every time.

(note that if you relaunch safari2 after it crashes it will relaunch with the safari3 rendering engine)

Seems to be an issue with passing .childNodes into $A() on an element that isn't attached to anything.


var node = new Element('div', {html: $('test').innerHTML});


I can't look at it anymore right now.

I originally found the issue when I was using the Request.HTML code and it's taken me a while to boil it down to this issue.

When I get some more time I can try and boil it down some more.


Trac Attachments

Trac Comments

Changed 4 months ago by subtleGradient

This code is seen in action at: 


Changed 4 months ago by kamicane

                  Changed 4 months ago by kamicane

              set to kamicane
              changed from new to assigned

              set to kamicane
              changed from new to assigned

Changed 3 months ago by JanK

Accessing node.childNodes.$family or any other undefined property of childNodes causes Safari 2 to crash in some cases. 
Requirements for a crash seem to be: The node is not in the DOM and probably only text is set as node.innerHTML, if innerHTML is 'test' for example it seems not to crash. 

full html: 

function init() {
        var node = document.createElement('div');
        node.innerHTML = 'doh';
        node.childNodes.$family; // or any undefined value


Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins