Skip to content

Commit

Permalink
Fix #119: Merge DOMSettableTokenList into DOMTokenList
Browse files Browse the repository at this point in the history
Move DOMSettableTokenList#value to DOMTokenList and remove the
DOMSettableTokenList interface.
  • Loading branch information
zcorpan authored and annevk committed Jan 1, 2016
1 parent b58cf9b commit 6cb9aaf
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 45 deletions.
34 changes: 11 additions & 23 deletions dom.bs
Original file line number Diff line number Diff line change
Expand Up @@ -8511,8 +8511,7 @@ These constants can be used for the

<h2 id="sets">Sets</h2>

<p class="note no-backref">Yes, the names {{DOMTokenList}} and {{DOMSettableTokenList}}
are unfortunate legacy mishaps.
<p class="note no-backref">Yes, the name {{DOMTokenList}} is an unfortunate legacy mishap.

<h3 id="interface-domtokenlist">Interface {{DOMTokenList}}</h3>

Expand All @@ -8526,6 +8525,7 @@ interface DOMTokenList {
boolean toggle(DOMString token, optional boolean force);
void replace(DOMString token, DOMString newToken);
boolean supports(DOMString token);
attribute DOMString value;
stringifier;
iterable&lt;DOMString>;
};
Expand Down Expand Up @@ -8640,6 +8640,11 @@ associated <a for="/">element</a>'s
<p>Returns true if <var>token</var> is in the associated attribute's supported tokens. Returns
false otherwise.
<p>Throws a <code>TypeError</code> exception if the associated attribute has no supported tokens defined.

<dt><code><var>tokenlist</var> . {{DOMTokenList/value}}</code>
<dd>
<p>Returns the associated set as string.
<p>Can be set, to change the associated attribute.
</dl>

<p>The <dfn attribute for=DOMTokenList><code>length</code></dfn> attribute' getter must return the
Expand Down Expand Up @@ -8772,32 +8777,15 @@ method, when invoked, must run these steps:
<li><p>Return <var>result</var>.
</ol>

<p>The <dfn export for=DOMTokenList id=dom-domtokenlist-stringifier>stringification behavior</dfn>
must return the result of running <a>context object</a>'s <a>serialize steps</a>.


<h3 id="interface-domsettabletokenlist">Interface {{DOMSettableTokenList}}</h3>

<pre class="idl">
interface DOMSettableTokenList : DOMTokenList {
attribute DOMString value;
};
</pre>

<dl class="domintro">
<dt><code><var>tokenlist</var> . {{DOMSettableTokenList/value}}</code>
<dd>
<p>Returns the associated set as string.
<p>Can be set, to change the associated attribute.
</dl>

<p>The <dfn attribute for=DOMSettableTokenList><code>value</code></dfn> attribute must return the
<p>The <dfn attribute for=DOMTokenList><code>value</code></dfn> attribute must return the
result of running <a>context object</a>'s <a>serialize steps</a>.

<p>Setting the {{DOMSettableTokenList/value}} attribute must <a>set an attribute value</a> for the
<p>Setting the {{DOMTokenList/value}} attribute must <a>set an attribute value</a> for the
associated <a for="/">element</a> using associated <a>attribute</a>'s <a for=Attr>local name</a> and
the given value.

<p>The <dfn export for=DOMTokenList id=dom-domtokenlist-stringifier>stringification behavior</dfn>
must return the result of running <a>context object</a>'s <a>serialize steps</a>.


<h2 id='historical'>Historical</h2>
Expand Down
33 changes: 11 additions & 22 deletions dom.html
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ <h2 class="no-num no-toc no-ref heading settled" id="contents"><span class="cont
<a href="#sets"><span class="secno">7</span> <span class="content">Sets</span></a>
<ul class="toc">
<li><a href="#interface-domtokenlist"><span class="secno">7.1</span> <span class="content">Interface <code class="idl"><span>DOMTokenList</span></code></span></a>
<li><a href="#interface-domsettabletokenlist"><span class="secno">7.2</span> <span class="content">Interface <code class="idl"><span>DOMSettableTokenList</span></code></span></a>
</ul>
<li>
<a href="#historical"><span class="secno">8</span> <span class="content">Historical</span></a>
Expand Down Expand Up @@ -4100,7 +4099,7 @@ <h3 class="heading settled" data-level="6.3" id="interface-nodefilter"><span cla
<li><dfn class="idl-code" data-dfn-for="NodeFilter" data-dfn-type="const" data-export="" id="dom-nodefilter-show_document_fragment">SHOW_DOCUMENT_FRAGMENT<a class="self-link" href="#dom-nodefilter-show_document_fragment"></a></dfn> (1024, 400 in hexadecimal).
</ul>
<h2 class="heading settled" data-level="7" id="sets"><span class="secno">7. </span><span class="content">Sets</span><a class="self-link" href="#sets"></a></h2>
<p class="note no-backref" role="note">Yes, the names <code class="idl"><a data-link-type="idl" href="#domtokenlist">DOMTokenList</a></code> and <code class="idl"><a data-link-type="idl" href="#domsettabletokenlist">DOMSettableTokenList</a></code> are unfortunate legacy mishaps. </p>
<p class="note no-backref" role="note">Yes, the name <code class="idl"><a data-link-type="idl" href="#domtokenlist">DOMTokenList</a></code> is an unfortunate legacy mishap. </p>
<h3 class="heading settled" data-level="7.1" id="interface-domtokenlist"><span class="secno">7.1. </span><span class="content">Interface <code class="idl"><a data-link-type="idl" href="#domtokenlist">DOMTokenList</a></code></span><a class="self-link" href="#interface-domtokenlist"></a></h3>
<pre class="idl">interface <dfn class="idl-code" data-dfn-type="interface" data-export="" id="domtokenlist">DOMTokenList<a class="self-link" href="#domtokenlist"></a></dfn> {
readonly attribute unsigned long <a class="idl-code" data-link-type="attribute" data-readonly="" data-type="unsigned long " href="#dom-domtokenlist-length">length</a>;
Expand All @@ -4111,6 +4110,7 @@ <h3 class="heading settled" data-level="7.1" id="interface-domtokenlist"><span c
boolean <a class="idl-code" data-link-type="method" href="#dom-domtokenlist-toggle">toggle</a>(DOMString <dfn class="idl-code" data-dfn-for="DOMTokenList/toggle(token, force), DOMTokenList/toggle(token)" data-dfn-type="argument" data-export="" id="dom-domtokenlist-toggle-token-force-token">token<a class="self-link" href="#dom-domtokenlist-toggle-token-force-token"></a></dfn>, optional boolean <dfn class="idl-code" data-dfn-for="DOMTokenList/toggle(token, force), DOMTokenList/toggle(token)" data-dfn-type="argument" data-export="" id="dom-domtokenlist-toggle-token-force-force">force<a class="self-link" href="#dom-domtokenlist-toggle-token-force-force"></a></dfn>);
void <a class="idl-code" data-link-type="method" href="#dom-domtokenlist-replace">replace</a>(DOMString <dfn class="idl-code" data-dfn-for="DOMTokenList/replace(token, newToken)" data-dfn-type="argument" data-export="" id="dom-domtokenlist-replace-token-newtoken-token">token<a class="self-link" href="#dom-domtokenlist-replace-token-newtoken-token"></a></dfn>, DOMString <dfn class="idl-code" data-dfn-for="DOMTokenList/replace(token, newToken)" data-dfn-type="argument" data-export="" id="dom-domtokenlist-replace-token-newtoken-newtoken">newToken<a class="self-link" href="#dom-domtokenlist-replace-token-newtoken-newtoken"></a></dfn>);
boolean <a class="idl-code" data-link-type="method" href="#dom-domtokenlist-supports">supports</a>(DOMString <dfn class="idl-code" data-dfn-for="DOMTokenList/supports(token)" data-dfn-type="argument" data-export="" id="dom-domtokenlist-supports-token-token">token<a class="self-link" href="#dom-domtokenlist-supports-token-token"></a></dfn>);
attribute DOMString <a class="idl-code" data-link-type="attribute" data-type="DOMString " href="#dom-domtokenlist-value">value</a>;
<a data-link-type="dfn" href="#dom-domtokenlist-stringifier">stringifier</a>;
iterable&lt;DOMString>;
};
Expand Down Expand Up @@ -4186,6 +4186,10 @@ <h3 class="heading settled" data-level="7.1" id="interface-domtokenlist"><span c
<p>Returns true if <var>token</var> is in the associated attribute’s supported tokens. Returns
false otherwise. </p>
<p>Throws a <code>TypeError</code> exception if the associated attribute has no supported tokens defined. </p>
<dt><code><var>tokenlist</var> . <code class="idl"><a data-link-type="idl" href="#dom-domtokenlist-value">value</a></code></code>
<dd>
<p>Returns the associated set as string. </p>
<p>Can be set, to change the associated attribute. </p>
</dl>
<p>The <dfn class="idl-code" data-dfn-for="DOMTokenList" data-dfn-type="attribute" data-export="" id="dom-domtokenlist-length"><code>length</code><a class="self-link" href="#dom-domtokenlist-length"></a></dfn> attribute' getter must return the
number of tokens in the <a data-link-type="dfn" href="#concept-dtl-tokens">tokens</a>. </p>
Expand Down Expand Up @@ -4284,23 +4288,12 @@ <h3 class="heading settled" data-level="7.1" id="interface-domtokenlist"><span c
<li>
<p>Return <var>result</var>. </p>
</ol>
<p>The <dfn data-dfn-for="DOMTokenList" data-dfn-type="dfn" data-export="" id="dom-domtokenlist-stringifier">stringification behavior<a class="self-link" href="#dom-domtokenlist-stringifier"></a></dfn> must return the result of running <a data-link-type="dfn" href="#context-object">context object</a>’s <a data-link-type="dfn" href="#concept-dtl-serialize">serialize steps</a>. </p>
<h3 class="heading settled" data-level="7.2" id="interface-domsettabletokenlist"><span class="secno">7.2. </span><span class="content">Interface <code class="idl"><a data-link-type="idl" href="#domsettabletokenlist">DOMSettableTokenList</a></code></span><a class="self-link" href="#interface-domsettabletokenlist"></a></h3>
<pre class="idl">interface <dfn class="idl-code" data-dfn-type="interface" data-export="" id="domsettabletokenlist">DOMSettableTokenList<a class="self-link" href="#domsettabletokenlist"></a></dfn> : <a data-link-type="idl-name" href="#domtokenlist">DOMTokenList</a> {
attribute DOMString <a class="idl-code" data-link-type="attribute" data-type="DOMString " href="#dom-domsettabletokenlist-value">value</a>;
};
</pre>
<dl class="domintro">
<dt><code><var>tokenlist</var> . <code class="idl"><a data-link-type="idl" href="#dom-domsettabletokenlist-value">value</a></code></code>
<dd>
<p>Returns the associated set as string. </p>
<p>Can be set, to change the associated attribute. </p>
</dl>
<p>The <dfn class="idl-code" data-dfn-for="DOMSettableTokenList" data-dfn-type="attribute" data-export="" id="dom-domsettabletokenlist-value"><code>value</code><a class="self-link" href="#dom-domsettabletokenlist-value"></a></dfn> attribute must return the
<p>The <dfn class="idl-code" data-dfn-for="DOMTokenList" data-dfn-type="attribute" data-export="" id="dom-domtokenlist-value"><code>value</code><a class="self-link" href="#dom-domtokenlist-value"></a></dfn> attribute must return the
result of running <a data-link-type="dfn" href="#context-object">context object</a>’s <a data-link-type="dfn" href="#concept-dtl-serialize">serialize steps</a>. </p>
<p>Setting the <code class="idl"><a data-link-type="idl" href="#dom-domsettabletokenlist-value">value</a></code> attribute must <a data-link-type="dfn" href="#concept-element-attributes-set-value">set an attribute value</a> for the
<p>Setting the <code class="idl"><a data-link-type="idl" href="#dom-domtokenlist-value">value</a></code> attribute must <a data-link-type="dfn" href="#concept-element-attributes-set-value">set an attribute value</a> for the
associated <a data-link-type="dfn" href="#concept-element">element</a> using associated <a data-link-type="dfn" href="#concept-attribute">attribute</a>’s <a data-link-type="dfn" href="#concept-attribute-local-name">local name</a> and
the given value. </p>
<p>The <dfn data-dfn-for="DOMTokenList" data-dfn-type="dfn" data-export="" id="dom-domtokenlist-stringifier">stringification behavior<a class="self-link" href="#dom-domtokenlist-stringifier"></a></dfn> must return the result of running <a data-link-type="dfn" href="#context-object">context object</a>’s <a data-link-type="dfn" href="#concept-dtl-serialize">serialize steps</a>. </p>
<h2 class="heading settled" data-level="8" id="historical"><span class="secno">8. </span><span class="content">Historical</span><a class="self-link" href="#historical"></a></h2>
<p>As explained in <a href="#goals">goals</a> this specification is a
significant revision of various DOM specifications. This section attempts to
Expand Down Expand Up @@ -4757,7 +4750,6 @@ <h3 class="no-num heading settled" id="index-defined-here"><span class="content"
<li><a href="#domimplementationsource">DOMImplementationSource</a><span>, in §8.2</span>
<li><a href="#domlocator">DOMLocator</a><span>, in §8.2</span>
<li><a href="#domobject">DOMObject</a><span>, in §8.2</span>
<li><a href="#domsettabletokenlist">DOMSettableTokenList</a><span>, in §7.2</span>
<li><a href="#domstringlist">DOMStringList</a><span>, in §8.2</span>
<li><a href="#domtokenlist">DOMTokenList</a><span>, in §7.1</span>
<li><a href="#domuserdata">DOMUserData</a><span>, in §8.2</span>
Expand Down Expand Up @@ -5283,7 +5275,7 @@ <h3 class="no-num heading settled" id="index-defined-here"><span class="content"
<ul>
<li><a href="#concept-attribute-value">dfn for Attr</a><span>, in §4.8.2</span>
<li><a href="#dom-attr-value">attribute for Attr</a><span>, in §4.8.2</span>
<li><a href="#dom-domsettabletokenlist-value">attribute for DOMSettableTokenList</a><span>, in §7.2</span>
<li><a href="#dom-domtokenlist-value">attribute for DOMTokenList</a><span>, in §7.1</span>
</ul>
<li><a href="#dom-element-webkitmatchesselector">webkitMatchesSelector(selectors)</a><span>, in §4.8</span>
<li>
Expand Down Expand Up @@ -5860,14 +5852,11 @@ <h2 class="no-num heading settled" id="idl-index"><span class="content">IDL Inde
boolean <a class="idl-code" data-link-type="method" href="#dom-domtokenlist-toggle">toggle</a>(DOMString <a href="#dom-domtokenlist-toggle-token-force-token">token</a>, optional boolean <a href="#dom-domtokenlist-toggle-token-force-force">force</a>);
void <a class="idl-code" data-link-type="method" href="#dom-domtokenlist-replace">replace</a>(DOMString <a href="#dom-domtokenlist-replace-token-newtoken-token">token</a>, DOMString <a href="#dom-domtokenlist-replace-token-newtoken-newtoken">newToken</a>);
boolean <a class="idl-code" data-link-type="method" href="#dom-domtokenlist-supports">supports</a>(DOMString <a href="#dom-domtokenlist-supports-token-token">token</a>);
attribute DOMString <a class="idl-code" data-link-type="attribute" data-type="DOMString " href="#dom-domtokenlist-value">value</a>;
<a data-link-type="dfn" href="#dom-domtokenlist-stringifier">stringifier</a>;
iterable&lt;DOMString>;
};

interface <a href="#domsettabletokenlist">DOMSettableTokenList</a> : <a data-link-type="idl-name" href="#domtokenlist">DOMTokenList</a> {
attribute DOMString <a class="idl-code" data-link-type="attribute" data-type="DOMString " href="#dom-domsettabletokenlist-value">value</a>;
};

</pre>
</body>
</html>

0 comments on commit 6cb9aaf

Please sign in to comment.