[DOM3Events] defaultView and event flow

View: New views
3 Messages — Rating Filter:   Alert me  

[DOM3Events] defaultView and event flow

by Anne van Kesteren-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

HTML5 currently defines how the Window object interacts with the DOM event  
flow. Is it the idea to move this into DOM Level 3 Events? If that is the  
case the special case made for the load event should also be made to apply  
to the capture phase. See the HTML5 text here:

http://www.whatwg.org/specs/web-apps/current-work/multipage/origin-0.html#events-and-the-window-object

I think if we decide to include this into DOM Level 3 Events it should be  
made normative and not just a "note" (with respect to the load event) as  
it is now.


The definition of defaultView could also use some work I think. Events are  
not dispatched on interfaces after all, they are dispatched on objects  
(which implement interfaces). Also note that the CSSWG is working on a new  
version of DOM Level 2 Views called the CSSOM View Module. (I added a  
proposed agenda item for TPAC to discuss support for views in general by  
the way.)


--
Anne van Kesteren
http://annevankesteren.nl/


Re: [DOM3Events] defaultView and event flow

by Olli Pettay :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 9/24/09 2:54 PM, Anne van Kesteren wrote:
> HTML5 currently defines how the Window object interacts with the DOM
> event flow. Is it the idea to move this into DOM Level 3 Events? If that
> is the case the special case made for the load event should also be made
> to apply to the capture phase. See the HTML5 text here:


Indeed, the spec shouldn't say "the load event does not bubble to the
defaultView", but "the load event does not propagate to the defaultView".
or something like that.


>
> http://www.whatwg.org/specs/web-apps/current-work/multipage/origin-0.html#events-and-the-window-object
>
>
> I think if we decide to include this into DOM Level 3 Events it should
> be made normative and not just a "note" (with respect to the load event)
> as it is now.
>
>
> The definition of defaultView could also use some work I think. Events
> are not dispatched on interfaces after all, they are dispatched on
> objects (which implement interfaces).
I agree. defaultView is an object which implements AbstractView.


> Also note that the CSSWG is
> working on a new version of DOM Level 2 Views called the CSSOM View
> Module. (I added a proposed agenda item for TPAC to discuss support for
> views in general by the way.)
But you're not going to propose to remove .defaultView or anything like
that I hope. Using .defaultView in the D3E allows defining the "window
propagation" without actually depending on any spec which defines window.


-Olli



Re: [DOM3Events] defaultView and event flow

by Anne van Kesteren-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, 24 Sep 2009 14:50:03 +0200, Olli Pettay <Olli.Pettay@...>  
wrote:
> But you're not going to propose to remove .defaultView or anything like  
> that I hope. Using .defaultView in the D3E allows defining the "window  
> propagation" without actually depending on any spec which defines window.

I would if we could, but deployed scripts use that attribute  
unfortunately. (Keeping it around just for specifications would be  
reversing the order of constituencies.)


--
Anne van Kesteren
http://annevankesteren.nl/