Simon Pieters
unread,Jan 27, 2015, 8:35:17 AM1/27/15Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Philip Jägenstedt, Yuki Shiino, blink-dev, Kentaro Hara, Dmitry Gozman, Jochen Eisinger, Pavel Feldman, Mike West, Adam Barth
On Tue, 27 Jan 2015 14:19:47 +0100, Yuki Shiino <
yukis...@chromium.org>
wrote:
> I wasn't unable to find a section describing the exact timing when
> iframe.contentWindow should be non-null, too.
>
> The spec says: The contentWindow IDL attribute must return the
> WindowProxy
> object of the iframe element's nested browsing context, if any, or null
> otherwise.
>
> So, if the nested browsing context or the WindowProxy object is not yet
> well-constructed nor ready to be accessible from JS, it seems okay to
> return null.
No, you need to also look at where the spec says that an iframe has a
browsing context or not.
[[
When an iframe element is inserted into a document that has a browsing
context, the user agent must create a nested browsing context, and then
process the iframe attributes for the "first time".
When an iframe element is removed from a document, the user agent must
discard the nested browsing context, if any.
]]
https://html.spec.whatwg.org/multipage/embedded-content.html#the-iframe-element:the-iframe-element-7
"process the iframe attributes" then navigates the browsing context:
https://html.spec.whatwg.org/multipage/embedded-content.html#process-the-iframe-attributes
--
Simon Pieters
Opera Software