[html5] r1006 - /

whatwg at whatwg.org whatwg at whatwg.org
Tue Aug 14 20:43:55 PDT 2007


Author: ianh
Date: 2007-08-14 20:43:54 -0700 (Tue, 14 Aug 2007)
New Revision: 1006

Modified:
   index
   source
Log:
[w] (2) Make document.open() and window.open() return things.

Modified: index
===================================================================
--- index	2007-08-15 00:43:16 UTC (rev 1005)
+++ index	2007-08-15 03:43:54 UTC (rev 1006)
@@ -1561,6 +1561,12 @@
 
    <li><a href="#rendering"><span class=secno>10. </span>Rendering</a>
     <ul class=toc>
+     <li>
+      <ul class=toc>
+       <li><a href="#section"><span class=secno>10.0.1. </span>Section
+        headers</a>
+      </ul>
+
      <li><a href="#rendering0"><span class=secno>10.1. </span>Rendering and
       the DOM</a>
 
@@ -2434,11 +2440,11 @@
 
   // <a href="#dynamic2">Dynamic markup insertion</a>
            attribute DOMString <a href="#innerhtml" title=dom-innerHTML>innerHTML</a>;
-  void <a href="#open" title=dom-document-open>open</a>();
-  void <a href="#open" title=dom-document-open>open</a>(in DOMString type);
-  void <a href="#open" title=dom-document-open>open</a>(in DOMString type, in DOMString replace);
-  void <a href="#open" title=dom-document-open>open</a>(in DOMString url, in DOMString name, in DOMString features);
-  void <a href="#open" title=dom-document-open>open</a>(in DOMString url, in DOMString name, in DOMString features, in bool replace);
+  <a href="#htmldocument">HTMLDocument</a> <a href="#open" title=dom-document-open>open</a>();
+  <a href="#htmldocument">HTMLDocument</a> <a href="#open" title=dom-document-open>open</a>(in DOMString type);
+  <a href="#htmldocument">HTMLDocument</a> <a href="#open" title=dom-document-open>open</a>(in DOMString type, in DOMString replace);
+  <a href="#window">Window</a> <a href="#open" title=dom-document-open>open</a>(in DOMString url, in DOMString name, in DOMString features);
+  <a href="#window">Window</a> <a href="#open" title=dom-document-open>open</a>(in DOMString url, in DOMString name, in DOMString features, in bool replace);
   void <a href="#close" title=dom-document-close>close</a>();
   void <a href="#document.write" title=dom-document-write>write</a>(in DOMString text);
   void <a href="#document.writeln" title=dom-document-writeln>writeln</a>(in DOMString text);
@@ -3568,7 +3574,8 @@
      the <a href="#insertion">insertion point</a> associated with that
      parser's <a href="#input0">input stream</a> is not undefined (that is,
      it <em>does</em> point to somewhere in the input stream), then the
-     method does nothing. Abort these steps.</p>
+     method does nothing. Abort these steps and return the
+     <code>Document</code> object on which the method was invoked.</p>
 
     <p class=note>This basically causes <code title=dom-document-open><a
      href="#open">document.open()</a></code> to be ignored when it's called
@@ -3642,6 +3649,9 @@
     <p>Finally, set the <a href="#insertion">insertion point</a> to point at
      just before the end of the <a href="#input0">input stream</a> (which at
      this point will be empty).
+
+   <li>
+    <p>Return the <code>Document</code> on which the method was invoked.
   </ol>
 
   <p class=big-issue>We shouldn't hard-code <code>text/plain</code> there. We
@@ -3659,9 +3669,9 @@
    of the <code>DocumentView</code> interface of the <code><a
    href="#htmldocument">HTMLDocument</a></code> object, with the same
    arguments as the original call to the <code title=dom-document-open><a
-   href="#open">open()</a></code> method. If the <code
-   title=dom-document-defaultView>defaultView</code> attribute of the
-   <code>DocumentView</code> interface of the <code><a
+   href="#open">open()</a></code> method, and return whatever that method
+   returned. If the <code title=dom-document-defaultView>defaultView</code>
+   attribute of the <code>DocumentView</code> interface of the <code><a
    href="#htmldocument">HTMLDocument</a></code> object is null, then the
    method must raise an <code>INVALID_ACCESS_ERR</code> exception.
 
@@ -5842,7 +5852,7 @@
   <ul>
    <li>Some can only contain other block-level elements: <code><a
     href="#blockquote">blockquote</a></code>, <code><a
-    href="#section">section</a></code>, <code><a
+    href="#section0">section</a></code>, <code><a
     href="#article">article</a></code>, <code><a
     href="#header">header</a></code>.
 
@@ -7745,7 +7755,7 @@
     href="#scoped">scoped</a></code> attribute is present: at the start of
     <code><a href="#article">article</a></code>, <code><a
     href="#aside">aside</a></code>, <code><a href="#div">div</a></code>, and
-    <code><a href="#section">section</a></code> elements.
+    <code><a href="#section0">section</a></code> elements.
 
    <dt>Content model:
 
@@ -7825,7 +7835,7 @@
    href="#style">style</a></code> element must be the child of an <code><a
    href="#article">article</a></code>, <code><a
    href="#aside">aside</a></code>, <code><a href="#div">div</a></code>, or
-   <code><a href="#section">section</a></code> element, before any <a
+   <code><a href="#section0">section</a></code> element, before any <a
    href="#significant0">significant text</a> or any elements other than
    <code><a href="#style">style</a></code> elements.
 
@@ -8022,7 +8032,7 @@
    arbitrary <code><a href="#body0">body</a></code> element.
 
   <h4 id=the-section><span class=secno>3.8.2. </span>The <dfn
-   id=section><code>section</code></dfn> element</h4>
+   id=section0><code>section</code></dfn> element</h4>
 
   <p><a href="#sectioning" title="sectioning elements">Sectioning</a> <a
    href="#block-level0" title="block-level elements">block-level element</a>.
@@ -8048,7 +8058,7 @@
     href="#htmlelement">HTMLElement</a></code>.
   </dl>
 
-  <p>The <code><a href="#section">section</a></code> element represents a
+  <p>The <code><a href="#section0">section</a></code> element represents a
    generic document or application section. A section, in this context, is a
    thematic grouping of content, typically with a header, possibly with a
    footer.
@@ -8058,8 +8068,8 @@
    site's home page could be split into sections for an introduction, news
    items, contact information.
 
-  <p>Each <code><a href="#section">section</a></code> element potentially has
-   a heading. See the section on <a href="#headings0">headings and
+  <p>Each <code><a href="#section0">section</a></code> element potentially
+   has a heading. See the section on <a href="#headings0">headings and
    sections</a> for further details.
 
   <h4 id=the-nav><span class=secno>3.8.3. </span>The <dfn
@@ -8360,7 +8370,7 @@
   <p><code><a href="#header">header</a></code> elements must not contain any
    <code><a href="#header">header</a></code> elements, <code><a
    href="#footer">footer</a></code> elements, or any sectioning elements
-   (such as <code><a href="#section">section</a></code>) as descendants.
+   (such as <code><a href="#section0">section</a></code>) as descendants.
 
   <p><code><a href="#header">header</a></code> elements must have at least
    one <code><a href="#h1">h1</a></code>, <code><a href="#h2">h2</a></code>,
@@ -8465,7 +8475,7 @@
    <code><a href="#h2">h2</a></code>, <code><a href="#h3">h3</a></code>,
    <code><a href="#h4">h4</a></code>, <code><a href="#h5">h5</a></code>, or
    <code><a href="#h6">h6</a></code> elements, or any of the sectioning
-   elements (such as <code><a href="#section">section</a></code>), as
+   elements (such as <code><a href="#section0">section</a></code>), as
    descendants.
 
   <p>When <a href="#determining1" title="Determining if a particular element
@@ -8604,14 +8614,14 @@
       <li> Quux (heading starting implied section)
 
       <li> Thud (heading of explicit <code><a
-       href="#section">section</a></code> section)
+       href="#section0">section</a></code> section)
      </ol>
      Grunt (paragraph)
    </ol>
 
    <p>Notice how the <code><a href="#blockquote">blockquote</a></code> nests
     inside an implicit section while the <code><a
-    href="#section">section</a></code> does not (and in fact, ends the
+    href="#section0">section</a></code> does not (and in fact, ends the
     earlier implicit section so that a later paragraph is back at the top
     level).</p>
   </div>
@@ -23533,6 +23543,11 @@
    href="#the-rules">the rules for chosing a browsing context given a
    browsing context name</a>.
 
+  <p>The method must return the <code><a href="#window">Window</a></code>
+   object of the default view of the <a href="#browsing0">browsing
+   context</a> that was navigated, or null if no browsing context was
+   navigated.
+
   <p>The <dfn id=name3 title=dom-name><code>name</code></dfn> attribute of
    the <code><a href="#window">Window</a></code> object must, on getting,
    return the current name of the <a href="#browsing0">browsing context</a>,
@@ -29027,7 +29042,7 @@
      <p>...the user agent should allow the user to insert <code><a
       href="#p">p</a></code> elements before and after the <code><a
       href="#dl">dl</a></code> element, as children of the <code><a
-      href="#section">section</a></code> element.</p>
+      href="#section0">section</a></code> element.</p>
     </div>
 
    <dt id=contenteditable-breakBlock>Break block
@@ -36265,7 +36280,7 @@
 
   <p class=big-issue>Still need to add these new elements to the lists:
    <code><a href="#event-source">event-source</a></code>, <code><a
-   href="#section">section</a></code>, <code><a href="#nav">nav</a></code>,
+   href="#section0">section</a></code>, <code><a href="#nav">nav</a></code>,
    <code><a href="#article">article</a></code>, <code><a
    href="#aside">aside</a></code>, <code><a href="#header">header</a></code>,
    <code><a href="#footer">footer</a></code>, <code><a
@@ -41463,13 +41478,19 @@
   <pre>@namespace xh url(http://www.w3.org/1999/xhtml);
 xh|section { display: block; margin: 1em 0; }</pre>
 
-  <h4>Section headers</h4>
 
-  <p>For <code>h1</code> elements, CSS-aware visual user agents should
-  derive the size of the header from the level of <code>section</code>
-  nesting. This effect should be achieved by including the following
-  rules, or their equivalent, in the UA's user agent style sheet:</p>
+<!-- XXX alt="": Define that either the src="" is shown (as an image)
+or the alt="" is shown (inline) but should not ever have both at
+once. -->
 
+  <h4 id=section><span class=secno>10.0.1. </span>Section headers</h4>
+
+  <p>For <code><a href="#h1">h1</a></code> elements, CSS-aware visual user
+   agents should derive the size of the header from the level of <code><a
+   href="#section0">section</a></code> nesting. This effect should be
+   achieved by including the following rules, or their equivalent, in the
+   UA's user agent style sheet:
+
   <pre>@namespace xh url(http://www.w3.org/1999/xhtml);
 xh|section xh|h1 { /* same styles as h2 */ }
 xh|section xh|section xh|h1 { /* same styles as h4 */ }
@@ -41477,12 +41498,13 @@
 xh|section xh|section xh|section xh|section xh|h1 { /* same styles as h5 */ }
 xh|section xh|section xh|section xh|section xh|section xh|h1 { /* same styles as h6 */ }</pre>
 
-  <p>Authors should use <code>h1</code> elements to denote headers in
-  sections. Authors may instead use <code>h2</code> ...
-  <code>h6</code> elements, for backwards compatibility with user
-  agents that do not support <code>section</code> elements.</p>
+  <p>Authors should use <code><a href="#h1">h1</a></code> elements to denote
+   headers in sections. Authors may instead use <code><a
+   href="#h2">h2</a></code> ... <code><a href="#h6">h6</a></code> elements,
+   for backwards compatibility with user agents that do not support <code><a
+   href="#section0">section</a></code> elements.
 
--->
+  <p>-->
 
   <p class=big-issue> must define letting the user <dfn id=obtain>obtain a
    physical form</dfn> of a document (printing) and what this means for the

Modified: source
===================================================================
--- source	2007-08-15 00:43:16 UTC (rev 1005)
+++ source	2007-08-15 03:43:54 UTC (rev 1006)
@@ -934,11 +934,11 @@
 
   // <span>Dynamic markup insertion</span>
            attribute DOMString <span title="dom-innerHTML">innerHTML</span>;
-  void <span title="dom-document-open">open</span>();
-  void <span title="dom-document-open">open</span>(in DOMString type);
-  void <span title="dom-document-open">open</span>(in DOMString type, in DOMString replace);
-  void <span title="dom-document-open">open</span>(in DOMString url, in DOMString name, in DOMString features);
-  void <span title="dom-document-open">open</span>(in DOMString url, in DOMString name, in DOMString features, in bool replace);
+  <span>HTMLDocument</span> <span title="dom-document-open">open</span>();
+  <span>HTMLDocument</span> <span title="dom-document-open">open</span>(in DOMString type);
+  <span>HTMLDocument</span> <span title="dom-document-open">open</span>(in DOMString type, in DOMString replace);
+  <span>Window</span> <span title="dom-document-open">open</span>(in DOMString url, in DOMString name, in DOMString features);
+  <span>Window</span> <span title="dom-document-open">open</span>(in DOMString url, in DOMString name, in DOMString features, in bool replace);
   void <span title="dom-document-close">close</span>();
   void <span title="dom-document-write">write</span>(in DOMString text);
   void <span title="dom-document-writeln">writeln</span>(in DOMString text);
@@ -2095,7 +2095,8 @@
     <span>insertion point</span> associated with that parser's
     <span>input stream</span> is not undefined (that is, it
     <em>does</em> point to somewhere in the input stream), then the
-    method does nothing. Abort these steps.</p>
+    method does nothing. Abort these steps and return the
+    <code>Document</code> object on which the method was invoked.</p>
 
     <p class="note">This basically causes <code
     title="dom-document-open">document.open()</code> to be ignored
@@ -2165,6 +2166,9 @@
    just before the end of the <span>input stream</span> (which at this
    point will be empty).</p></li>
 
+   <li><p>Return the <code>Document</code> on which the method was
+   invoked.</p></li>
+
   </ol>
 
   <p class="big-issue">We shouldn't hard-code <code>text/plain</code>
@@ -2183,7 +2187,8 @@
   title="dom-document-defaultView">defaultView</code> attribute of the
   <code>DocumentView</code> interface of the <code>HTMLDocument</code>
   object, with the same arguments as the original call to the <code
-  title="dom-document-open">open()</code> method. If the <code
+  title="dom-document-open">open()</code> method, and return whatever
+  that method returned. If the <code
   title="dom-document-defaultView">defaultView</code> attribute of the
   <code>DocumentView</code> interface of the <code>HTMLDocument</code>
   object is null, then the method must raise an
@@ -21198,6 +21203,10 @@
   <span>the rules for chosing a browsing context given a browsing
   context name</span>.</p>
 
+  <p>The method must return the <code>Window</code> object of the
+  default view of the <span>browsing context</span> that was
+  navigated, or null if no browsing context was navigated.</p>
+
   <p>The <dfn title="dom-name"><code>name</code></dfn> attribute of
   the <code>Window</code> object must, on getting, return the current
   name of the <span>browsing context</span>, and, on setting, set the
@@ -37374,6 +37383,11 @@
   <pre>@namespace xh url(http://www.w3.org/1999/xhtml);
 xh|section { display: block; margin: 1em 0; }</pre>
 
+
+<!-- XXX alt="": Define that either the src="" is shown (as an image)
+or the alt="" is shown (inline) but should not ever have both at
+once. -->
+
   <h4>Section headers</h4>
 
   <p>For <code>h1</code> elements, CSS-aware visual user agents should




More information about the Commit-Watchers mailing list