Re: DOM 2 Views

On Mon, 12 Apr 2010 12:43:19 +0200, Olli Pettay <>  
> in there is a
> proposal to "Remove concept of views" and move the property of
> AbstractView to HTML5's Window and the property of DocumentView to
> HTMLDocument.
> Pretty much everyone implements AbstractView and DocumentView [1][2] in  
> some way and since those interfaces are trivial I don't quite see the
> reason for the proposed change.

It removes the need to expose the interfaces on the global object. It  
removes the suggested need to implement a views concept which we agreed  
during the F2F was not something that was going to happen and does not  
work very well with how the global and other objects have been extended in  
the past decade.

> DOM 2 Views has one practical advantage. It allows other
> specifications to refer to AbstractView (which is in practice the
> Window object). That way other specifications don't need to refer to
> unstable HTML5's Window.
> AbstractView is used this way for example in DOM 3 Events.
> So, I wonder what is the reason for proposed change?
> The bug report certainly doesn't explain that.
> Although it may sound a bit strange to keep D2V alive just
> because of AbstractView, I see it pretty practical way
> to allow other specifications to refer to Window without actually
> taking in all the HTML5 baggage.

You could create a simple specification that just defines Window without  
any of its members if you want something like that. Most specifications  
that deal with eventing or callbacks need some kind of HTML5 dependency  
anyway because it defines the event loop. So I'm not sure if the advantage  
of having something like that would be big, but it might work for DOM  

> [1]  
> [2]

Anne van Kesteren

Received on Monday, 12 April 2010 11:15:52 UTC