January 14, 2001 - Owning an Element | WebReference

January 14, 2001 - Owning an Element

Yehuda Shiran January 14, 2001
Owning an Element
Tips: January 2001

Yehuda Shiran, Ph.D.
Doc JavaScript

The ownerDocument property behaves differently in Netscape 6 and Internet Explorer. In the following example, the statement creates a new node:

demoObj =  document.createElement("DUMMY");
And the following statement prints the node's ownerDocument:

demoObj.ownerDocument
This statement yields an undefined message in Internet Explorer and a null value in Netscape 6.