Re: [Off-topic] HTML 4.01 and the IFRAME element

David Dorward wrote:

> The child nodes of an iframe element are the alternative content for browsers without iframe support (or with it disabled).
> You want the contentDocument[1] property to reach the document loaded inside the frame (subject to the same origin policy[2]):
>
>
> [1] https://developer.mozilla.org/en/XUL/iframe#p-contentDocument
> [2] https://developer.mozilla.org/en/Same_origin_policy_for_JavaScript

Thank you, David.  I should have realised that (i.e., "the child nodes
of an iframe element are the alternative content") but before
I received your message I found a way of accessing the elements
of the document specified by the "src" attribute without (as
far as I can see) using the "contentDocument" property :

 Walk (window.frames [0].document)

What difference is there, if any, between, frames [0].document
and frames [0].contentDocument, do you know ?

Philip Taylor

Received on Wednesday, 11 January 2012 08:14:06 UTC