W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2004

Re: "iframe" and dom problem

From: Brad Fults <brad@mipscomputation.com>
Date: Thu, 16 Dec 2004 12:40:52 -0800
Message-ID: <41C1F2D4.90004@mipscomputation.com>
To: antinet@nextware.co.kr
CC: www-dom@w3.org

June Lee wrote:

> self.document.getElementById("myEmbed").contentDocument.lastModified
> : self.document.getElementById("myEmbed").contentDocument means
>   document object of "myEmbed" element. it is document object.
> (DOM Level 2, works in Mozilla not in [IE]).
>  
> self.document.getElementById("myEmbed").document.lastModified
> : self.document.getElementById("myEmbed").document means
>   document object of "myEmbed" element. it is document object.
> (DOM Level 2, works in IE. not in Mozilla).

Actually the latter will not work in IE. That will access the 
lastModified property of the *current* document (in which the object 
resides). Currently there is no direct way (through the properties of 
the object) in IE of accessing the document of a page loaded into an 
object via the data attribute. As noted by a forum post [1], the window 
of the document loaded into the object is included in the window.frames 
collection. This is not much use to you, however, in XHTML 1.0 Strict.

My conclusion is that <object> support simply isn't consistent or mature 
enough to be used as a universal solution. Instead, I would recommend 
use of XHTML 1.0 Transitional for pages that require iframes, as the 
<iframe> element is much more well-supported.

[1] - http://www.webmasterworld.com/forum21/6539.htm

-- 
Brad Fults
NeatBox
Received on Thursday, 16 December 2004 20:42:48 GMT

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