[whatwg] Should events be paused on detached iframes?
ian at hixie.ch
Tue Jan 17 15:31:53 PST 2012
On Tue, 12 Jul 2011, Boris Zbarsky wrote:
> On 6/13/11 8:09 PM, Ian Hickson wrote:
> > > It's possible to switch these relevant checks to walk the
> > > ownerDocument chain instead, say. Then we need to audit all the
> > > callsites to make sure this makes sense at them and figure out what
> > > to do for the ones where it doesn't. (For example, should
> > > window.alert on the window of an iframe not in the DOM put up a
> > > dialog in a tab based on the ownerDocument of the iframe? Or not
> > > put one up at all?)
> > It should put it up in the context of the top-level browsing context
> > of the script that led to that point (the "first script"). This is the
> > same as if someone in one tab calls another tab's script and that
> > script calls alert().
> Is that last what browsers actually do? I'm pretty sure that's not what
> Gecko does...
If there's specific features in the spec that are incorrectly specified,
I'm happy to address them. Send mail with a test case showing the problem.
> There are also issues in terms of network loads that are live when an
> iframe is removed from its document, whether network loads can _start_
> in such a removed iframe, what the styling behavior, if any, is (e.g.
> how should media query matching work?), layout behavior, if any (what's
> the initial containing block size?). What should happen if click() is
> called on anchors? Or is that covered by the events thing above?
> Basically, pretty much every single aspect of the platform's behavior
> needs to be sanity-checked in this context...
Well, I'm not sure I'm up for sanity checking the entire spec, especially
for edge case areas like this where interop isn't really present anyway so
it's not clear what a "wrong" answer would be.
> I'm also a little saddened that there has been absolutely no feedback so
> far from the people who've been implementing this, even in cases when
> the current spec doesn't really cover behavior.... We're not going to
> get to interop that way.
The best way forward here might be just to add tests to the test suite and
see who complains...
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the whatwg