W3C home > Mailing lists > Public > www-validator-css@w3.org > January 2012

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

From: Philip TAYLOR <P.Taylor@Rhul.Ac.Uk>
Date: Wed, 11 Jan 2012 08:05:42 +0000
Message-ID: <4F0D42D6.7090207@Rhul.Ac.Uk>
CC: www-validator-css@w3.org


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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 27 June 2012 00:14:29 GMT