Skip to content

Commit

Permalink
Editorial: simplify DOMTokenList IDL
Browse files Browse the repository at this point in the history
Because of 07e9fc0 there is no need
for a separate value attribute definition and stringier.

Fixes #314.
  • Loading branch information
annevk committed Aug 25, 2016
1 parent e4b7778 commit cb85ac4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
5 changes: 1 addition & 4 deletions dom.bs
Original file line number Diff line number Diff line change
Expand Up @@ -9287,8 +9287,7 @@ interface DOMTokenList {
[CEReactions] boolean toggle(DOMString token, optional boolean force);
[CEReactions] void replace(DOMString token, DOMString newToken);
boolean supports(DOMString token);
[CEReactions] attribute DOMString value;
stringifier;
[CEReactions] stringifier attribute DOMString value;
iterable<DOMString>;
};
</pre>
Expand Down Expand Up @@ -9540,8 +9539,6 @@ result of running <a>context object</a>'s <a>serialize steps</a>.
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
9 changes: 3 additions & 6 deletions dom.html
Original file line number Diff line number Diff line change
Expand Up @@ -5121,8 +5121,7 @@ <h3 class="heading settled" data-level="7.1" id="interface-domtokenlist"><span c
[<a class="nv idl-code" data-link-type="extended-attribute" href="https://html.spec.whatwg.org/multipage/scripting.html#cereactions">CEReactions</a>] <span class="kt">boolean</span> <a class="nv idl-code" data-link-type="method" href="#dom-domtokenlist-toggle">toggle</a>(<span class="kt">DOMString</span> <dfn class="nv 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>, <span class="kt">optional</span> <span class="kt">boolean</span> <dfn class="nv 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>);
[<a class="nv idl-code" data-link-type="extended-attribute" href="https://html.spec.whatwg.org/multipage/scripting.html#cereactions">CEReactions</a>] <span class="kt">void</span> <a class="nv idl-code" data-link-type="method" href="#dom-domtokenlist-replace">replace</a>(<span class="kt">DOMString</span> <dfn class="nv 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>, <span class="kt">DOMString</span> <dfn class="nv 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>);
<span class="kt">boolean</span> <a class="nv idl-code" data-link-type="method" href="#dom-domtokenlist-supports">supports</a>(<span class="kt">DOMString</span> <dfn class="nv 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>);
[<a class="nv idl-code" data-link-type="extended-attribute" href="https://html.spec.whatwg.org/multipage/scripting.html#cereactions">CEReactions</a>] <span class="kt">attribute</span> <span class="kt">DOMString</span> <a class="nv idl-code" data-link-type="attribute" data-type="DOMString" href="#dom-domtokenlist-value">value</a>;
<a class="kt" data-link-type="dfn" href="#dom-domtokenlist-stringifier">stringifier</a>;
[<a class="nv idl-code" data-link-type="extended-attribute" href="https://html.spec.whatwg.org/multipage/scripting.html#cereactions">CEReactions</a>] <dfn class="kt" data-dfn-for="DOMTokenList" data-dfn-type="dfn" data-lt="stringification behavior" data-noexport="" id="DOMTokenList-stringification-behavior">stringifier<a class="self-link" href="#DOMTokenList-stringification-behavior"></a></dfn> <span class="kt">attribute</span> <span class="kt">DOMString</span> <a class="nv idl-code" data-link-type="attribute" data-type="DOMString" href="#dom-domtokenlist-value">value</a>;
<span class="kt">iterable</span>&lt;<span class="kt">DOMString</span>>;
};
</pre>
Expand Down Expand Up @@ -5302,7 +5301,6 @@ <h3 class="heading settled" data-level="7.1" id="interface-domtokenlist"><span c
<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 @@ -6360,7 +6358,7 @@ <h3 class="no-num no-ref heading settled" id="index-defined-here"><span class="c
stringification behavior
<ul>
<li><a href="#dom-range-stringifier">dfn for Range</a><span>, in §5.2</span>
<li><a href="#dom-domtokenlist-stringifier">dfn for DOMTokenList</a><span>, in §7.1</span>
<li><a href="#DOMTokenList-stringification-behavior">dfn for DOMTokenList</a><span>, in §7.1</span>
</ul>
<li><a href="#concept-cd-substring">substring data</a><span>, in §4.10</span>
<li><a href="#dom-characterdata-substringdata">substringData(offset, count)</a><span>, in §4.10</span>
Expand Down Expand Up @@ -7143,8 +7141,7 @@ <h2 class="no-num no-ref heading settled" id="idl-index"><span class="content">I
[<a class="nv idl-code" data-link-type="extended-attribute" href="https://html.spec.whatwg.org/multipage/scripting.html#cereactions">CEReactions</a>] <span class="kt">boolean</span> <a class="nv idl-code" data-link-type="method" href="#dom-domtokenlist-toggle">toggle</a>(<span class="kt">DOMString</span> <a class="nv" href="#dom-domtokenlist-toggle-token-force-token">token</a>, <span class="kt">optional</span> <span class="kt">boolean</span> <a class="nv" href="#dom-domtokenlist-toggle-token-force-force">force</a>);
[<a class="nv idl-code" data-link-type="extended-attribute" href="https://html.spec.whatwg.org/multipage/scripting.html#cereactions">CEReactions</a>] <span class="kt">void</span> <a class="nv idl-code" data-link-type="method" href="#dom-domtokenlist-replace">replace</a>(<span class="kt">DOMString</span> <a class="nv" href="#dom-domtokenlist-replace-token-newtoken-token">token</a>, <span class="kt">DOMString</span> <a class="nv" href="#dom-domtokenlist-replace-token-newtoken-newtoken">newToken</a>);
<span class="kt">boolean</span> <a class="nv idl-code" data-link-type="method" href="#dom-domtokenlist-supports">supports</a>(<span class="kt">DOMString</span> <a class="nv" href="#dom-domtokenlist-supports-token-token">token</a>);
[<a class="nv idl-code" data-link-type="extended-attribute" href="https://html.spec.whatwg.org/multipage/scripting.html#cereactions">CEReactions</a>] <span class="kt">attribute</span> <span class="kt">DOMString</span> <a class="nv idl-code" data-link-type="attribute" data-type="DOMString" href="#dom-domtokenlist-value">value</a>;
<a class="kt" data-link-type="dfn" href="#dom-domtokenlist-stringifier">stringifier</a>;
[<a class="nv idl-code" data-link-type="extended-attribute" href="https://html.spec.whatwg.org/multipage/scripting.html#cereactions">CEReactions</a>] <a class="kt" href="#DOMTokenList-stringification-behavior">stringifier</a> <span class="kt">attribute</span> <span class="kt">DOMString</span> <a class="nv idl-code" data-link-type="attribute" data-type="DOMString" href="#dom-domtokenlist-value">value</a>;
<span class="kt">iterable</span>&lt;<span class="kt">DOMString</span>>;
};

Expand Down

0 comments on commit cb85ac4

Please sign in to comment.