W3C home > Mailing lists > Public > public-html-commits@w3.org > July 2010

html5/spec Overview.html,1.4134,1.4135

From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
Date: Tue, 27 Jul 2010 05:37:20 +0000
To: public-html-commits@w3.org
Message-Id: <E1Odcqu-0001Nu-7i@lionel-hutz.w3.org>
Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv5306

Modified Files:
	Overview.html 
Log Message:
Reluctantly define document.load(). (whatwg r5199)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.4134
retrieving revision 1.4135
diff -u -d -r1.4134 -r1.4135
--- Overview.html	23 Jul 2010 23:21:06 -0000	1.4134
+++ Overview.html	27 Jul 2010 05:37:16 -0000	1.4135
@@ -308,7 +308,7 @@
 
    <h1>HTML5</h1>
    <h2 class="no-num no-toc" id="a-vocabulary-and-associated-apis-for-html-and-xhtml">A vocabulary and associated APIs for HTML and XHTML</h2>
-   <h2 class="no-num no-toc" id="editor-s-draft-23-july-2010">Editor's Draft 23 July 2010</h2>
+   <h2 class="no-num no-toc" id="editor-s-draft-27-july-2010">Editor's Draft 27 July 2010</h2>
    <dl><dt>Latest Published Version:</dt>
     <dd><a href="http://www.w3.org/TR/html5/">http://www.w3.org/TR/html5/</a></dd>
     <dt>Latest Editor's Draft:</dt>
@@ -414,7 +414,7 @@
   Group</a> is the W3C working group responsible for this
   specification's progress along the W3C Recommendation
   track.
-  This specification is the 23 July 2010 Editor's Draft.
+  This specification is the 27 July 2010 Editor's Draft.
   </p><!-- UNDER NO CIRCUMSTANCES IS THE PRECEDING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- relationship to other work (required) --><p>Work on this specification is also done at the <a href="http://www.whatwg.org/">WHATWG</a>. The W3C HTML working group
   actively pursues convergence with the WHATWG, as required by the <a href="http://www.w3.org/2007/03/HTML-WG-charter">W3C HTML working
   group charter</a>.</p><!-- UNDER NO CIRCUMSTANCES IS THE FOLLOWING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- required patent boilerplate --><p>This document was produced by a group operating under the <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5
@@ -526,7 +526,8 @@
      <li><a href="#security-document"><span class="secno">3.1.2 </span>Security</a></li>
      <li><a href="#resource-metadata-management"><span class="secno">3.1.3 </span>Resource metadata management</a></li>
      <li><a href="#dom-tree-accessors"><span class="secno">3.1.4 </span>DOM tree accessors</a></li>
-     <li><a href="#creating-documents"><span class="secno">3.1.5 </span>Creating documents</a></ol></li>
+     <li><a href="#creating-documents"><span class="secno">3.1.5 </span>Creating documents</a></li>
+     <li><a href="#loading-xml-documents"><span class="secno">3.1.6 </span>Loading XML documents</a></ol></li>
    <li><a href="#elements"><span class="secno">3.2 </span>Elements</a>
     <ol>
      <li><a href="#semantics-0"><span class="secno">3.2.1 </span>Semantics</a></li>
@@ -7549,6 +7550,104 @@
 
    <li><p>Return <var title="">doc</var>.</li>
 
+  </ol></div><div class="impl"> <!-- very deprecated API; use XHR instead -->
+
+  <h4 id="loading-xml-documents"><span class="secno">3.1.6 </span>Loading XML documents</h4>
+
+  <p>A <code><a href="#document">Document</a></code> object that is an <a href="#xml-documents" title="XML
+  documents">XML document</a> must also implement the
+  <code><a href="#xmldocumentloader">XMLDocumentLoader</a></code> interface:</p>
+
+  <pre class="idl">[Supplemental, NoInterfaceObject]
+interface <dfn id="xmldocumentloader">XMLDocumentLoader</dfn> {
+           attribute boolean <a href="#dom-xmldocumentloader-async" title="dom-XMLDocumentLoader-async">async</a>;
+  boolean <a href="#dom-xmldocumentloader-load" title="dom-XMLDocumentLoader-load">load</a>(in DOMString url);
+};</pre>
+
+  <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/saved/576 -->
+  <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/saved/577 -->
+  <!-- http://www.hixie.ch/tests/adhoc/dom/level0/document/load/001.html -->
+
+  <p>The <dfn id="dom-xmldocumentloader-async" title="dom-XMLDocumentLoader-async"><code>async</code></dfn>
+  attribute must initially be true. On getting, it must return its
+  current value. On setting, its current value must be changed to the
+  new value.</p>
+
+  <p>The <dfn id="dom-xmldocumentloader-load" title="dom-XMLDocumentLoader-load"><code>load(<var title="">url</var>)</code></dfn> method must run the following
+  steps:</p>
+
+  <ol><li><p>Let <var title="">document</var> be the <code><a href="#document">Document</a></code>
+   object on which the method was invoked.</p>~</li>
+
+   <li><p>If the <span>origin of <var title="">url</var> is not
+   the same as the <a href="#origin">origin</a> of <var title="">document</var>, throw a <code><a href="#security_err">SECURITY_ERR</a></code>
+   exception.</span></li>
+
+   <li><p>Remove all child nodes of <var title="">document</var>,
+   without firing any mutation events.</li> <!-- as of 2010-07-26,
+   only Opera fired mutation events here. -->
+
+   <li><p>Set the <a href="#current-document-readiness">current document readiness</a> of <var title="">document</var> to "loading".</li>
+
+   <li><p>If <code title="dom-XMLDocumentLoader-async"><a href="#dom-xmldocumentloader-async">async</a></code> is
+   set to true, then run the remainder of these steps asynchronously,
+   and return true from the method. Otherwise, continue running these
+   steps without yet returning.</li>
+
+   <li><p>Let <var title="">result</var> be an <code><a href="#document">Document</a></code>
+   object.</li>
+
+   <li><p>Let <var title="">success</var> be false.</li>
+
+   <li><p><a href="#fetch">Fetch</a> <var title="">url</var> from the
+   <a href="#origin">origin</a> of <var title="">document</var>, with the <var title="">synchronous flag</var> set and the <var title="">force
+   same-origin flag</var> set.</li>
+
+   <li>
+
+    <p>If the fetch attempt was successful, and the resource's <a href="#content-type" title="Content-Type">Content-Type metadata</a> is an <a href="#xml-mime-type">XML
+    MIME type</a>, then run these substeps:</p>
+
+    <ol><li><p>Create a new <a href="#xml-parser">XML parser</a> associated with the
+     <var title="">result</var> document.</li>
+
+     <li><p>Pass this parser the fetched document.</li> <!-- no
+     worries about scripts running; there's no browsing context for
+     the document so scripts are automatically disabled -->
+
+     <li><p>If there is an XML well-formedness or XML namespace
+     well-formedness error, then remove all child nodes from <var title="">result</var>. Otherwise let <var title="">success</var>
+     be true.</li>
+
+    </ol></li>
+
+   <li>
+
+    <p>If <code title="dom-XMLDocumentLoader-async"><a href="#dom-xmldocumentloader-async">async</a></code> is
+    set to true, then <a href="#queue-a-task">queue a task</a> to run the following
+    steps. Otherwise, run them synchronously.</p>
+
+    <ol><li><p>Set the <a href="#current-document-readiness">current document readiness</a> of <var title="">document</var> to "complete".</li>
+
+     <li><p>Replace all the children of <var title="">document</var>
+     by the children of <var title="">result</var> (even if it has no
+     children), firing mutation events as if a
+     <code><a href="#documentfragment">DocumentFragment</a></code> containing the new children had
+     been inserted.</li> <!-- as of 2010-07-26, both Firefox and
+     Opera fired mutation events here. -->
+
+     <!-- If the document doesn't have no nodes here, at time of
+     writing, Opera would leave the new nodes and drop the parsed
+     ones, while Firefox would basically abort instead, failing to
+     fire the 'load' event -->
+
+     <li><p><a href="#fire-a-simple-event">Fire a simple event</a> named <code title="event-load">load</code> at <var title="">document</var>.</li>
+
+    </ol></li>
+
+   <li><p>If <code title="dom-XMLDocumentLoader-async"><a href="#dom-xmldocumentloader-async">async</a></code> is
+   set to false, return <var title="">success</var>.</li>
+
   </ol></div><h3 id="elements"><span class="secno">3.2 </span>Elements</h3><p class="XXX annotation"><b>Status: </b><i>Last call for comments</i><h4 id="semantics-0"><span class="secno">3.2.1 </span>Semantics</h4><p class="XXX annotation"><b>Status: </b><i>Last call for comments. </i><span><a href="http://www.w3.org/html/wg/tracker/issues/41">ISSUE-41</a> (Decentralized-extensibility) blocks progress to Last Call</span><p>Elements, attributes, and attribute values in HTML are defined
   (by this specification) to have certain meanings (semantics). For
   example, the <code><a href="#the-ol-element">ol</a></code> element represents an ordered list, and
@@ -60228,6 +60327,7 @@
 tfoot, tfoot[hidden] { display: table-footer-group; }
 tr, tr[hidden] { display: table-row; }
 td, th, td[hidden], th[hidden] { display: table-cell; }
+
 colgroup[hidden], col[hidden], thead[hidden], tbody[hidden],
 tfoot[hidden], tr[hidden], td[hidden], th[hidden] {
   visibility: collapse;
Received on Tuesday, 27 July 2010 05:37:22 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 July 2010 05:37:24 GMT