- From: Kristof Zelechovski <giecrilj@stegny.2a.pl>
- Date: Mon, 23 Jun 2008 09:49:24 +0200
Editorial remarks: 1. The links to current document readiness are reflexive and should be removed. 2. The page loading process mentioned should be linked to the relevant section. It would be convenient for the reader and it would also provide a visual indication that it is a reference to a locally defined technical term. Chris -----Original Message----- From: whatwg-bounces@lists.whatwg.org [mailto:whatwg-bounces at lists.whatwg.org] On Behalf Of Dan Fabulich Sent: Monday, June 23, 2008 12:56 AM To: whatwg at whatwg.org Subject: [whatwg] document.readyState and its initial value document.readyState was added to HTML5 in April of this year. http://lists.whatwg.org/pipermail/commit-watchers-whatwg.org/2008/000652.htm l http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#current > Each document has a current document readiness. When a Document object > is created, it must have its current document readiness set to the > string "loading". Various algorithms during page loading affect this > value. When the value is set, the user agent must fire a simple event > called readystatechanged at the Document object. As far as I can tell via google, there has been no discussion of this property on lists.whatwg.org, so I'd like to suggest a small enhancement to the spec. HTML5 says that the current document readiness should be "loading" when the document is created; instead the initial state should be "uninitialized". document.readyState was initially defined by Microsoft as a proprietary extension to DOM. Here's their MSDN documentation of document.readyState: http://msdn.microsoft.com/en-us/library/ms534359(VS.85).aspx > An object's state is initially set to uninitialized, and then to > loading. When data loading is complete, the state of the link object > passes through the loaded and interactive states to reach the complete > state. I believe HTML5 should change to agree with Microsoft on this point. Safari and Opera have implemented document.readyState to agree with Microsoft and I don't think it's appropriate for HTML5 to break new ground here. This matters to me because I'm trying to fix Firefox to support this property, and we need to know what the initial state should be. The point is small and not very important because it's almost impossible to encounter an HTML document in Internet Explorer in the "uninitialized" state. But I think the fix is small and uncontroversial: Index: source =================================================================== --- source (revision 1790) +++ source (working copy) @@ -4613,7 +4613,7 @@ <p>Each document has a <dfn>current document readiness</dfn>. When a <code>Document</code> object is created, it must have its <span>current document readiness</span> set to the string - "loading". Various algorithms during page loading affect this + "uninitialized". Various algorithms during page loading affect this value. When the value is set, the user agent must <span>fire a simple event</span> called <code title="event-readystatechanged">readystatechanged</code> at the
Received on Monday, 23 June 2008 00:49:24 UTC