W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2002

getting hold of the element holding a document

From: Ian Hickson <ian@hixie.ch>
Date: Thu, 04 Jul 2002 17:19:35 +0100
Message-ID: <3D247597.5030205@hixie.ch>
To: www-dom@W3.org

An <object> in XHTML can contain another XHTML document. In the DOM, to go from 
the containing <object> element's object to the embedded document, one uses the 
HTMLObjectElement object's contentDocument property.

 From that document, though, how does one get back to the HTMLObjectElement 
object? There's no |parent| property on Document objects, and since documents 
are defined as being the root of the document tree, |parentNode| is no use.

Even non-standard DOM properties like |window.parent| don't really help here, 
since that gives access to the parent's window (and from there the parent 
document) but not the containing element.

Any help would be greatly appreciated. If this can't be done, it would be cool 
if it could be added to DOM3 Core!

Ian Hickson                                      )\._.,--....,'``.    fL
"meow"                                          /,   _.. \   _\  ;`._ ,.
http://index.hixie.ch/                         `._.-(,_..'--(,_..'`-.;.'
Received on Thursday, 4 July 2002 12:19:37 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:10 UTC