Skip to content
Permalink
Browse files

[giow] (3) Try to define order for supported property names. This is …

…not based on testing. If there are compatibility constraints here that prevent implementing this as specced, please let me know.

Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=20395
Affected topics: DOM APIs, HTML, Microdata, Workers

git-svn-id: http://svn.whatwg.org/webapps@7722 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
Hixie committed Feb 13, 2013
1 parent 45ae61a commit a1ff0f3d88f738705c862e1a80c4fdc67a9d244f
Showing with 89 additions and 37 deletions.
  1. +29 −13 complete.html
  2. +29 −13 index
  3. +31 −11 source

<header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 12 February 2013</h2>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 13 February 2013</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>

<li>The <dfn id=concept-node-insert title=concept-node-insert>insert</dfn>, <dfn id=concept-node-append title=concept-node-append>append</dfn>, <dfn id=concept-node-remove title=concept-node-remove>remove</dfn>, and <dfn id=concept-node-replace title=concept-node-replace>replace</dfn> algorithms for nodes</li>
<li>The <dfn id=nodes-are-inserted>nodes are inserted</dfn> and <dfn id=nodes-are-removed>nodes are removed</dfn> concepts</li>
<li>The <dfn id=attribute-list>attribute list</dfn> concept.</li>

<li><dfn id=event><code>Event</code></dfn> interface</li>
<li><dfn id=eventtarget><code>EventTarget</code></dfn> interface</li>
<code><a href=#htmlcollection>HTMLCollection</a></code> objects.</p>

<p>The <a href=#supported-property-names>supported property names</a> consist of the values of all the <code title=attr-id><a href=#the-id-attribute>id</a></code> and <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> attributes of all the
elements <a href=#represented-by-the-collection>represented by the collection</a>.</p>
elements <a href=#represented-by-the-collection>represented by the collection</a>, in <a href=#tree-order>tree order</a>, ignoring later
duplicates, with the <code title=attr-id><a href=#the-id-attribute>id</a></code> of an element preceding its <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> if it has both, they differ from each other, and neither is the
duplicate of an earlier entry.</p>

<p>The <dfn id=dom-htmlformcontrolscollection-nameditem title=dom-HTMLFormControlsCollection-namedItem><code>namedItem(<var title="">name</var>)</code></dfn> method must act according to the following algorithm:</p>

<code><a href=#the-optgroup-element>optgroup</a></code> elements (though it can remove children from them).</p>

<p>The <a href=#supported-property-names>supported property names</a> consist of the values of all the <code title=attr-id><a href=#the-id-attribute>id</a></code> and <code title=attr-option-name><a href=#attr-option-name>name</a></code> attributes of all the
elements <a href=#represented-by-the-collection>represented by the collection</a>.</p>
elements <a href=#represented-by-the-collection>represented by the collection</a>, in <a href=#tree-order>tree order</a>, ignoring later
duplicates, with the <code title=attr-id><a href=#the-id-attribute>id</a></code> of an element preceding its <code title=attr-option-name><a href=#attr-option-name>name</a></code> if it has both, they differ from each other, and neither is
the duplicate of an earlier entry.</p>

<p>The <dfn id=dom-htmloptionscollection-nameditem title=dom-HTMLOptionsCollection-namedItem><code>namedItem(<var title="">name</var>)</code></dfn> method must return the first node in the collection that has
either an <code title=attr-id><a href=#the-id-attribute>id</a></code> attribute or a <code title=attr-option-name><a href=#attr-option-name>name</a></code> attribute equal to <var title="">name</var>, if there is one;
<code><a href=#htmlcollection>HTMLCollection</a></code> objects.</p>

<p>The <a href=#supported-property-names>supported property names</a> consist of the <a href=#property-names>property names</a> of all the
elements <a href=#represented-by-the-collection>represented by the collection</a>.</p>
elements <a href=#represented-by-the-collection>represented by the collection</a>, in <a href=#tree-order>tree order</a>, ignoring later
duplicates.</p>

<p>The <dfn id=dom-htmlpropertiescollection-names title=dom-HTMLPropertiesCollection-names><code>names</code></dfn> attribute must
return a <a href=#live>live</a> <a href=#dfn-read-only-array title=dfn-read-only-array>read only</a> array object giving

<p>The <a href=#supported-property-names>supported property names</a> on a <code><a href=#domstringmap>DOMStringMap</a></code> object at any instant
are the names of each pair returned from the algorithm for getting the list of name-value pairs at
that instant.</p>
that instant, in the order returned.</p>

<p>To <dfn id=dom-domstringmap-nameditem title=dom-DOMStringMap-namedItem>determine the value of a named property</dfn> <var title="">name</var> in a <code><a href=#domstringmap>DOMStringMap</a></code>, the user agent must return the value component
of the name-value pair whose name component is <var title="">name</var> in the list returned by

<p>The <a href=#supported-property-names>supported property names</a> on a <code><a href=#domelementmap>DOMElementMap</a></code> object at any instant
are the names for each mapping returned from the algorithm for getting the list of name-element
mappings at that instant.</p>
mappings at that instant, in the order returned.</p>

<p>To <dfn id=dom-domelementmap-nameditem title=dom-DOMElementMap-namedItem>determine the value of a named property</dfn> <var title="">name</var> in a <code><a href=#domelementmap>DOMElementMap</a></code>, the user agent must return the element
component of the name-element mapping whose name component is <var title="">name</var> in the list
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-img-element>img</a></code>
elements in the <code><a href=#document>Document</a></code> that have both <code title=attr-name>name</code> content
attributes and <code title=attr-id><a href=#the-id-attribute>id</a></code> content attributes.</p>
attributes and <code title=attr-id><a href=#the-id-attribute>id</a></code> content attributes. The <a href=#supported-property-names>supported property
names</a> must be in <a href=#tree-order>tree order</a>, ignoring later duplicates.</p>

<p>To <a href=#determine-the-value-of-a-named-property>determine the value of a named property</a> <var title="">name</var> when <dfn id=dom-document-nameditem title=dom-document-namedItem>the <code>Document</code> object is indexed for property
retrieval</dfn>, the user agent must return the value obtained using the following steps:</p>
<ol><li>Let <var title="">list</var> be an empty list of name-value
pairs.</li>

<!--CLEANUP-->
<li>For each content attribute on the element whose first five characters are the string "<code title="">data-</code>" and whose remaining characters (if any) do not include any
<a href=#uppercase-ascii-letters>uppercase ASCII letters</a>, add a name-value pair to <var title="">list</var> whose
<a href=#uppercase-ascii-letters>uppercase ASCII letters</a>,
in the order that those attributes are listed in the element's <span>attributes list</span>,
add a name-value pair to <var title="">list</var> whose
name is the attribute's name with the first five characters removed and whose value is the
attribute's value.</li>

boolean <a href=#dom-form-checkvalidity title=dom-form-checkValidity>checkValidity</a>();
};</pre>
</dd>
</dl><!--TOPIC:HTML--><p>The <code><a href=#the-form-element>form</a></code> element <a href=#represents>represents</a> a
</dl><!--TOPIC:HTML--><!--CLEANUP--><p>The <code><a href=#the-form-element>form</a></code> element <a href=#represents>represents</a> a
collection of <a href=#form-associated-element title="form-associated element">form-associated
elements</a>, some of which can represent editable values that
can be submitted to a server for processing.</p>
<p>The <a href=#supported-property-names>supported property names</a> consist of the values
of all the <code title=attr-id><a href=#the-id-attribute>id</a></code> and <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> attributes of all the <a href=#category-listed title=category-listed>listed elements</a> and <code><a href=#the-img-element>img</a></code>
elements that are descendants of the <code><a href=#the-form-element>form</a></code> element, and
all the names currently in the <a href=#past-names-map>past names map</a>.</p>
all the names currently in the <a href=#past-names-map>past names map</a>, in <a href=#tree-order>tree order</a>, with <code title=attr-id><a href=#the-id-attribute>id</a></code> attributes preceding <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> attributes
preceding entries from the <a href=#past-names-map>past names map</a>, with multiple entries in the <a href=#past-names-map>past
names map</a> for the same element being ordered chronologically by when they were added to the
map, and in all cases ignoring later duplicates.</p>

<p>When a <code><a href=#the-form-element>form</a></code> element is <dfn id=dom-form-nameditem title=dom-form-namedItem>indexed for named property
retrieval</dfn>, the user agent must run the following steps:</p>
</dl><div class=impl>

<p>The <code><a href=#window>Window</a></code> interface <a href=#support-named-properties title="support named properties">supports named
properties</a>. The <a href=#supported-property-names>supported property names</a> at any moment consist of:</p>
properties</a>. The <a href=#supported-property-names>supported property names</a> at any moment consist of the
following, in <a href=#tree-order>tree order</a>, ignoring later duplicates:</p>

<ul><li>the <a href=#browsing-context-name>browsing context name</a> of any <a href=#child-browsing-context>child browsing context</a> of the
<a href=#active-document>active document</a> whose name is not the empty string,</li>

<p>The DOM APIs &mdash; specifically, all the interfaces defind in the DOM specification other
than exceptions &mdash; must not be <a href=#expose title=expose>exposed</a> if the <a href=#javascript-global-environment>JavaScript
global environment</a> is a <a href=#worker-environment>worker environment</a>. <a href=#hrefDOMCORE>[DOMCORE]</a></p>
global environment</a> is a <a href=#worker-environment>worker environment</a>. <a href=#refsDOM>[DOM]</a></p>


<h4 id=importing-scripts-and-libraries><span class=secno>9.3.1 </span>Importing scripts and libraries</h4>

<h4 id=the-storage-interface><span class=secno>11.2.1 </span>The <code><a href=#storage-0>Storage</a></code> interface</h4>

<!--CLEANUP-->
<pre class=idl>interface <dfn id=storage-0>Storage</dfn> {
readonly attribute unsigned long <a href=#dom-storage-length title=dom-Storage-length>length</a>;
DOMString? <a href=#dom-storage-key title=dom-Storage-key>key</a>(unsigned long index);

<p>The <a href=#supported-property-names>supported property names</a> on a
<code><a href=#storage-0>Storage</a></code> object are the keys of each key/value pair
currently present in the list associated with the object.</p>
currently present in the list associated with the object, in the order that the keys were last
added to the storage area.</p>

<p>The <dfn id=dom-storage-getitem title=dom-Storage-getItem><code>getItem(<var title="">key</var>)</code></dfn> method must return
the current value associated with

0 comments on commit a1ff0f3

Please sign in to comment.
You can’t perform that action at this time.