W3C home > Mailing lists > Public > whatwg@whatwg.org > September 2011

[whatwg] readystatechange for SCRIPT

From: Ian Hickson <ian@hixie.ch>
Date: Sat, 10 Sep 2011 01:10:08 +0000 (UTC)
Message-ID: <Pine.LNX.4.64.1109092220180.7754@ps20323.dreamhostps.com>
On Fri, 9 Sep 2011, Boris Zbarsky wrote:
> > > 
> > > HTMLDocument, or Document?
> > 
> > They're more or less the same, per spec.
> 
> Well.... no, they're not.  In particular, HTMLDocument.prototype is not 
> on the prototype chain of XMLDocument.prototype in any UA I'm aware of, 
> whereas Document.prototype is.  Perhaps you're saying the spec will 
> change that?

Right, hence "per spec". :-)

The idea is to move to a world with only one Document interface, which 
contains everything from SVGDocument, HTMLDocument, Document, etc, because 
it really makes no sense that SVG fragments in HTML documents can't use 
the Document-level SVG APIs, and vice-versa.

Exactly how this is to happen is not yet clear.


> Now any given document object may implement both interfaces, but where 
> properties live in the prototype chain is _very_ different depending on 
> whether they're on Document or HTMLDocument.  Again, assuming that there 
> is a separate HTMLDocument interface object and so forth.

Right.


> > > If it's put on HTMLDocument exclusively, that would solve the 
> > > XMLDocument.prototype problem as well.  But the readyState property 
> > > seems to be on Document, not HTMLDocument....
> > 
> > HTMLDocument in the HTML spec defines HTMLDocument.readyState but 
> > says:
> > 
> >     Document implements HTMLDocument;
> 
> Doing that means that hooking HTMLDocument.prototype methods won't 
> actually change methods on documents, right?  How web-compatible is 
> that?

I don't believe it's compatible at all. The spec is likely to change on 
this matter.


> > There's been a suggestion that I should just define it as a partial 
> > interface for Document instead and then define HTMLDocument === 
> > Document, but I haven't looked into that yet.
> 
> That might actually be more web-compatible....  Maybe.

Yeah.


> > Since nobody seems to object, I'm going to revert r6543 and make 
> > onreadystatechange special.
> 
> Sounds good.  Please let me know when the new spec text is up?

It is done.

   http://html5.org/r/6550

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Friday, 9 September 2011 18:10:08 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:36 UTC