[Bug 24314] [Custom]: enteredView and leftView callbacks are still confusing

https://www.w3.org/Bugs/Public/show_bug.cgi?id=24314

--- Comment #12 from Ryosuke Niwa <rniwa@webkit.org> ---
(In reply to Erik Arvidsson from comment #11)
> (In reply to Ryosuke Niwa from comment #10)
> > (In reply to Erik Arvidsson from comment #8)
> > > The important concept is to get called when inserted into a non inert
> > > document. This is a document with a browsing context.
> > > 
> > > Basically, if you poll it should fire when the following becomes true:
> > > 
> > > element.ownerDocument.contains(element) && element.ownerDocument.defaultView
> > 
> > If that's really the condition, why can't scripts simply check that
> > condition instead?
> 
> Polling drains battery life but even if that was not an issue the timing for
> these would be wrong.

I'm not suggesting polling. I'm suggesting, instead, to add callbacks that are
called whenever a custom element is inserted into or removed from a document,
and the script could check whether the current document has defaultView or not.

Also, the fact these callbacks cannot be explained or implemented as mutation
observers is problematic. I don't think we want to add completely different
mechanisms and queues for custom elements when we've just recently added
mutation observers.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Tuesday, 11 February 2014 04:57:15 UTC