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!

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

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:56 GMT