W3C home > Mailing lists > Public > public-webapi@w3.org > April 2006

Re: ISSUE-66: should Documents that aren\'t being presented be required to have a null defaultView?

From: Cameron McCormack <cam@mcc.id.au>
Date: Tue, 4 Apr 2006 20:34:42 +1000
To: public-webapi@w3.org
Message-ID: <20060404103442.GA28090@port.mcc.id.au>

Web APIs Issue Tracker:
> The spec requires that any Document being presented in a browsing context must implement the 
> DocumentWindow interface, which inherits from the AbstractView interface, and that the defaultView 
> attribute thus inherited must be the document's window object.
> 
> It also requires that if any document that *isn't* being presented in a browsing context implements the 
> DocumentWindow interface, then the defaultView must be null.
> 
>  Ian Hickson questioned whether it makes sense to require this - I am not sure if it is good or not 
> myself. I don't think we can necessarily require that such documents not implement DocumentWindow, 
> since in browsers they'll likely be the same kind of object as presented documents.
> 
> (An example of non-presented documents would be the responseXML document of XMLHttpRequest.)
> 
> Sorry if this point is too obscure for anyone to really care about.

I think it's fine to require any Document not being presented in a
browsing context that does implement DocumentWindow to have its
defaultView attribute be null.  Since, as you say, it may be common for
the same classes to implement presented and non-presented Documents, it
is not sensible to require all Documents implement DocumentWindow.  I'm
not sure I understand what the problem is, and how it wouldn't make
sense.  That a Document implements DocumentWindow doesn't imply that it
actually has a Window, does it?

-- 
 Cameron McCormack			ICQ: 26955922
 cam (at) mcc.id.au			MSN: cam (at) mcc.id.au
 http://mcc.id.au/			JBR: heycam (at) jabber.org
Received on Tuesday, 4 April 2006 10:34:52 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:18:54 GMT