[html5] r2642 - [gi] (2) Define Document's [[Get]]ter. (credit: sp)

whatwg at whatwg.org whatwg at whatwg.org
Mon Jan 12 16:20:59 PST 2009


Author: ianh
Date: 2009-01-12 16:20:57 -0800 (Mon, 12 Jan 2009)
New Revision: 2642

Modified:
   index
   source
Log:
[gi] (2) Define Document's [[Get]]ter. (credit: sp)

Modified: index
===================================================================
--- index	2009-01-12 03:29:54 UTC (rev 2641)
+++ index	2009-01-13 00:20:57 UTC (rev 2642)
@@ -22,7 +22,7 @@
   <div class=head>
    <p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG src=/images/logo></a></p>
    <h1>HTML 5</h1>
-   <h2 class="no-num no-toc" id=draft-recommendation-—-date:-01-jan-1901>Draft Recommendation — 12 January 2009</h2>
+   <h2 class="no-num no-toc" id=draft-recommendation-—-date:-01-jan-1901>Draft Recommendation — 13 January 2009</h2>
    <p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
    <p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
    <dl><dt>Multiple-page version:</dt>
@@ -5854,7 +5854,8 @@
   simply being the primary interface of the document object, it is no
   longer defined as inheriting from <code>Document</code>.</p>
 
-  <pre class=idl>interface <dfn id=htmldocument>HTMLDocument</dfn> {
+  <pre class=idl>[<a href=#dom-document-nameditem title=dom-document-namedItem>NameGetter</a>]
+interface <dfn id=htmldocument>HTMLDocument</dfn> {
   // <a href=#resource-metadata-management>resource metadata management</a>
   [PutForwards=href] readonly attribute <a href=#location>Location</a> <a href=#dom-document-location title=dom-document-location>location</a>;
   readonly attribute DOMString <a href=#dom-document-url title=dom-document-URL>URL</a>;
@@ -6317,7 +6318,47 @@
 > optional tag name.
 -->
 
-  <p class=note>The <code title=dom-document-dir><a href=#dom-document-dir>dir</a></code>
+  <p>The <code><a href=#htmldocument>HTMLDocument</a></code> interface <span title="support
+  named properties">supports named properties</span>. The <span>names
+  of the supported named properties</span> at any moment consist of
+  the values of the <code title=attr-name>name</code> content
+  attributes of all the <code><a href=#the-applet-element>applet</a></code>, <code><a href=#the-embed-element>embed</a></code>,
+  <code><a href=#the-form-element>form</a></code>, <code><a href=#the-iframe-element>iframe</a></code>, <code><a href=#the-img-element>img</a></code>, and
+  <code><a href=#the-object-element>object</a></code> elements in the <code>Document</code> that have
+  <code title=attr-name>name</code> content attributes, and the
+  values of the <code title=attr-id><a href=#the-id-attribute>id</a></code> content attributes of
+  all the <code><a href=#the-applet-element>applet</a></code> and <code><a href=#the-object-element>object</a></code> elements in the
+  <code>Document</code> that have <code title=attr-id><a href=#the-id-attribute>id</a></code>
+  content attributes.</p>
+
+  <p>When <dfn id=dom-document-nameditem title=dom-document-namedItem>the
+  <code>HTMLDocument</code> object is indexed for property
+  retrieval</dfn> using a name <var title="">name</var>, then: if the
+  list of <a href=#dom-document-nameditem-filter title=dom-document-namedItem-filter>named
+  elements</a> with the name <var title="">name</var> in the
+  <code>Document</code> <!-- There will be at least one such element,
+  by definition. (If there wasn't, then this algorithm wouldn't have
+  been invoked by WebIDL.) --> has only one element, then that element
+  must be the value returned; otherwise the value returned must be an
+  <code><a href=#htmlcollection-0>HTMLCollection</a></code> rooted at the <code>Document</code>
+  node, whose filter matches only <a href=#dom-document-nameditem-filter title=dom-document-namedItem-filter>named elements</a> with the
+  name <var title="">name</var>.</p> <!-- the same one each time is
+  returned, because of the rule under collections -->
+
+  <p><dfn id=dom-document-nameditem-filter title=dom-document-nameditem-filter>Named elements</dfn>
+  with the name <var title="">name</var> are those that are
+  either:</p>
+
+  <ul><li><code><a href=#the-applet-element>applet</a></code>, <code><a href=#the-embed-element>embed</a></code>, <code><a href=#the-form-element>form</a></code>,
+   <code><a href=#the-iframe-element>iframe</a></code>, <code><a href=#the-img-element>img</a></code>, or <code><a href=#the-object-element>object</a></code>
+   elements that have a <code title=attr-name>name</code> content
+   attribute whose value is <var title="">name</var>, or</li>
+
+   <li><code><a href=#the-applet-element>applet</a></code> or <code><a href=#the-object-element>object</a></code> elements that have a
+   <code title=attr-id><a href=#the-id-attribute>id</a></code> content attribute whose value is
+   <var title="">name</var>.</li>
+
+  </ul><p class=note>The <code title=dom-document-dir><a href=#dom-document-dir>dir</a></code>
   attribute on the <code><a href=#htmldocument>HTMLDocument</a></code> interface is defined
   along with the <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> content
   attribute.</p>

Modified: source
===================================================================
--- source	2009-01-12 03:29:54 UTC (rev 2641)
+++ source	2009-01-13 00:20:57 UTC (rev 2642)
@@ -5832,7 +5832,8 @@
   simply being the primary interface of the document object, it is no
   longer defined as inheriting from <code>Document</code>.</p>
 
-  <pre class="idl">interface <dfn>HTMLDocument</dfn> {
+  <pre class="idl">[<span title="dom-document-namedItem">NameGetter</span>]
+interface <dfn>HTMLDocument</dfn> {
   // <span>resource metadata management</span>
   [PutForwards=href] readonly attribute <span>Location</span> <span title="dom-document-location">location</span>;
   readonly attribute DOMString <span title="dom-document-URL">URL</span>;
@@ -6355,6 +6356,52 @@
 > optional tag name.
 -->
 
+  <p>The <code>HTMLDocument</code> interface <span title="support
+  named properties">supports named properties</span>. The <span>names
+  of the supported named properties</span> at any moment consist of
+  the values of the <code title="attr-name">name</code> content
+  attributes of all the <code>applet</code>, <code>embed</code>,
+  <code>form</code>, <code>iframe</code>, <code>img</code>, and
+  <code>object</code> elements in the <code>Document</code> that have
+  <code title="attr-name">name</code> content attributes, and the
+  values of the <code title="attr-id">id</code> content attributes of
+  all the <code>applet</code> and <code>object</code> elements in the
+  <code>Document</code> that have <code title="attr-id">id</code>
+  content attributes.</p>
+
+  <p>When <dfn title="dom-document-namedItem">the
+  <code>HTMLDocument</code> object is indexed for property
+  retrieval</dfn> using a name <var title="">name</var>, then: if the
+  list of <span title="dom-document-namedItem-filter">named
+  elements</span> with the name <var title="">name</var> in the
+  <code>Document</code> <!-- There will be at least one such element,
+  by definition. (If there wasn't, then this algorithm wouldn't have
+  been invoked by WebIDL.) --> has only one element, then that element
+  must be the value returned; otherwise the value returned must be an
+  <code>HTMLCollection</code> rooted at the <code>Document</code>
+  node, whose filter matches only <span
+  title="dom-document-namedItem-filter">named elements</span> with the
+  name <var title="">name</var>.</p> <!-- the same one each time is
+  returned, because of the rule under collections -->
+
+  <p><dfn title="dom-document-nameditem-filter">Named elements</dfn>
+  with the name <var title="">name</var> are those that are
+  either:</p>
+
+  <ul>
+
+   <li><code>applet</code>, <code>embed</code>, <code>form</code>,
+   <code>iframe</code>, <code>img</code>, or <code>object</code>
+   elements that have a <code title="attr-name">name</code> content
+   attribute whose value is <var title="">name</var>, or</li>
+
+   <li><code>applet</code> or <code>object</code> elements that have a
+   <code title="attr-id">id</code> content attribute whose value is
+   <var title="">name</var>.</li>
+
+  </ul>
+
+
   <p class="note">The <code title="dom-document-dir">dir</code>
   attribute on the <code>HTMLDocument</code> interface is defined
   along with the <code title="attr-dir">dir</code> content




More information about the Commit-Watchers mailing list