[whatwg] document.readyState and its initial value

Ian Hickson ian at hixie.ch
Sun Jun 22 19:56:18 PDT 2008


On Sun, 22 Jun 2008, Dan Fabulich wrote:
> 
> As far as I know I can't exhibit a test demonstrating IE switching from 
> "uninitialized" to "loading."  The document is normally in the "loading" 
> state before you get your hands on it.

Ok, that matches my experience too -- that's why the spec says what it 
says. :-) (The spec, when it is documenting IE features, is more about 
documenting actual IE behaviour than about MSDN, which is notoriously 
unreliable.)


> However, I note that it would be legal under the terms of the MSDN 
> specification if some future version of IE *did* expose a way to make an 
> uninitialized document on which you could later call .open(), and the 
> HTML5 spec as-is would make that illegal.

Should that happen, we can revisit the issue... of course at that point IE 
would be non-conforming, so maybe it would just be considered a bug. :-)


> It's tempting to say that the readyState can start with either 
> "uninitialized" or "loading"; certainly it's odd that we'd just hike it 
> up to "loading" because our test mechanisms are usually too 
> coarse-grained to detect a readyState in its "uninitialized" state.

Well, it's not so much about our testing mechanisms so much as about what 
Web authors have to deal with. If there's no way to ever see that it 
starts in anything other than "loading", then for all intents and 
purposes, it starts in "loading".


> But, oddity is par for the course in DOM, so I guess we'll just follow 
> the HTML 5 spec as-is, initialize readyState to "loading" in the object 
> constructor, and keep our fingers crossed.

If you find any problems with doing this, please let me know, so we can 
update the spec!

Cheers,
-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'



More information about the whatwg mailing list