Skip to content

Commit

Permalink
Tweak [CEReactions] definition and usage
Browse files Browse the repository at this point in the history
This fixes #2362, by:

* Making it clearer that the steps inserted by [CEReactions] apply
  before/after what Web IDL calls "the actions listed in the description
  of" a given construct.
* Removing [CEReactions] from [PutForwards]-decorated readonly
  attributes, as it is redundant there.
  • Loading branch information
domenic committed Feb 22, 2017
1 parent deea9fb commit c422734
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -9209,7 +9209,7 @@ interface <dfn>HTMLElement</dfn> : <span>Element</span> {
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-accessKey">accessKey</span>;
readonly attribute DOMString <span data-x="dom-accessKeyLabel">accessKeyLabel</span>;
[<span>CEReactions</span>] attribute boolean <span data-x="dom-draggable">draggable</span>;
[<span>CEReactions</span>, SameObject, PutForwards=<span data-x="dom-DOMTokenList-value">value</span>] readonly attribute <span>DOMTokenList</span> <span data-x="dom-dropzone">dropzone</span>;
[SameObject, PutForwards=<span data-x="dom-DOMTokenList-value">value</span>] readonly attribute <span>DOMTokenList</span> <span data-x="dom-dropzone">dropzone</span>;
[<span>CEReactions</span>] attribute <span>HTMLMenuElement</span>? <span data-x="dom-contextMenu">contextMenu</span>;
[<span>CEReactions</span>] attribute boolean <span data-x="dom-spellcheck">spellcheck</span>;
void <span data-x="dom-forceSpellCheck">forceSpellCheck</span>();
Expand Down Expand Up @@ -12266,13 +12266,13 @@ interface <dfn>HTMLLinkElement</dfn> : <span>HTMLElement</span> {
[<span>CEReactions</span>] attribute DOMString? <span data-x="dom-link-crossOrigin">crossOrigin</span>;
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-link-rel">rel</span>;
[<span>CEReactions</span>] attribute <span>RequestDestination</span> <span data-x="dom-link-as">as</span>; // (default "")
[<span>CEReactions</span>, SameObject, PutForwards=<span data-x="dom-DOMTokenList-value">value</span>] readonly attribute <span>DOMTokenList</span> <span data-x="dom-link-relList">relList</span>;
[SameObject, PutForwards=<span data-x="dom-DOMTokenList-value">value</span>] readonly attribute <span>DOMTokenList</span> <span data-x="dom-link-relList">relList</span>;
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-link-media">media</span>;
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-link-nonce">nonce</span>;
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-link-integrity">integrity</span>;
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-link-hreflang">hreflang</span>;
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-link-type">type</span>;
[<span>CEReactions</span>, SameObject, PutForwards=<span data-x="dom-DOMTokenList-value">value</span>] readonly attribute <span>DOMTokenList</span> <span data-x="dom-link-sizes">sizes</span>;
[SameObject, PutForwards=<span data-x="dom-DOMTokenList-value">value</span>] readonly attribute <span>DOMTokenList</span> <span data-x="dom-link-sizes">sizes</span>;
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-link-referrerPolicy">referrerPolicy</span>;
[<span>CEReactions</span>] attribute USVString <span data-x="dom-link-scope">scope</span>;
[<span>CEReactions</span>] attribute <span>WorkerType</span> <span data-x="dom-link-workertype">workerType</span>;
Expand Down Expand Up @@ -18464,7 +18464,7 @@ interface <dfn>HTMLAnchorElement</dfn> : <span>HTMLElement</span> {
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-a-download">download</span>;
[<span>CEReactions</span>] attribute USVString <span data-x="dom-a-ping">ping</span>;
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-a-rel">rel</span>;
[<span>CEReactions</span>, SameObject, PutForwards=<span data-x="dom-DOMTokenList-value">value</span>] readonly attribute <span>DOMTokenList</span> <span data-x="dom-a-relList">relList</span>;
[SameObject, PutForwards=<span data-x="dom-DOMTokenList-value">value</span>] readonly attribute <span>DOMTokenList</span> <span data-x="dom-a-relList">relList</span>;
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-a-hreflang">hreflang</span>;
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-a-type">type</span>;

Expand Down Expand Up @@ -28095,7 +28095,7 @@ interface <dfn>HTMLIFrameElement</dfn> : <span>HTMLElement</span> {
[<span>CEReactions</span>] attribute USVString <span data-x="dom-iframe-src">src</span>;
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-iframe-srcdoc">srcdoc</span>;
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-iframe-name">name</span>;
[<span>CEReactions</span>, SameObject, PutForwards=<span data-x="dom-DOMTokenList-value">value</span>] readonly attribute <span>DOMTokenList</span> <span data-x="dom-iframe-sandbox">sandbox</span>;
[SameObject, PutForwards=<span data-x="dom-DOMTokenList-value">value</span>] readonly attribute <span>DOMTokenList</span> <span data-x="dom-iframe-sandbox">sandbox</span>;
[<span>CEReactions</span>] attribute boolean <span data-x="dom-iframe-allowFullscreen">allowFullscreen</span>;
[<span>CEReactions</span>] attribute boolean <span data-x="dom-iframe-allowPaymentRequest">allowPaymentRequest</span>;
[<span>CEReactions</span>] attribute boolean <span data-x="dom-iframe-allowUserMedia">allowUserMedia</span>;
Expand Down Expand Up @@ -37419,7 +37419,7 @@ interface <dfn>HTMLAreaElement</dfn> : <span>HTMLElement</span> {
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-area-download">download</span>;
[<span>CEReactions</span>] attribute USVString <span data-x="dom-area-ping">ping</span>;
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-area-rel">rel</span>;
[<span>CEReactions</span>, SameObject, PutForwards=<span data-x="dom-DOMTokenList-value">value</span>] readonly attribute <span>DOMTokenList</span> <span data-x="dom-area-relList">relList</span>;
[SameObject, PutForwards=<span data-x="dom-DOMTokenList-value">value</span>] readonly attribute <span>DOMTokenList</span> <span data-x="dom-area-relList">relList</span>;
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-area-referrerPolicy">referrerPolicy</span>;
};
<span>HTMLAreaElement</span> implements <span>HTMLHyperlinkElementUtils</span>;</pre>
Expand Down Expand Up @@ -50095,7 +50095,7 @@ Daddy">&lt;/textarea></pre>
<dd>
<pre class="idl">[<span>HTMLConstructor</span>]
interface <dfn>HTMLOutputElement</dfn> : <span>HTMLElement</span> {
[<span>CEReactions</span>, SameObject, PutForwards=<span data-x="dom-DOMTokenList-value">value</span>] readonly attribute <span>DOMTokenList</span> <span data-x="dom-output-htmlFor">htmlFor</span>;
[SameObject, PutForwards=<span data-x="dom-DOMTokenList-value">value</span>] readonly attribute <span>DOMTokenList</span> <span data-x="dom-output-htmlFor">htmlFor</span>;
readonly attribute <span>HTMLFormElement</span>? <span data-x="dom-fae-form">form</span>;
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-fe-name">name</span>;

Expand Down Expand Up @@ -66682,20 +66682,19 @@ customElements.define("x-foo", class extends HTMLElement {

<p>The <code data-x="CEReactions">[CEReactions]</code> extended attribute must take no
arguments, and must not appear on anything other than an operation, attribute, setter, or deleter.
Additionally, it must not appear on readonly attributes, unless the readonly attribute is also
annotated with <code data-x="">[PutForwards]</code>.</p>
Additionally, it must not appear on readonly attributes.</p>

<p>Operations, attributes, setters, or deleters annotated with the <code
data-x="CEReactions">[CEReactions]</code> extended attribute must run the following steps
surrounding the main algorithm specified for the operation, setter, deleter, or for the
surrounding the actions listed in the description of the operation, setter, deleter, or the
attribute's setter:</p>

<dl>
<dt>Before executing the algorithm's steps</dt>
<dt>Before executing the listed actions</dt>
<dd>Push a new <span>element queue</span> onto the <span>custom element reactions
stack</span>.</dd>

<dt>After executing the algorithm's steps</dt>
<dt>After executing the listed actions</dt>
<dd>Pop the <span>element queue</span> from the <span>custom element reactions stack</span>, and
<span>invoke custom element reactions</span> in that queue.</dd>
</dl>
Expand Down

0 comments on commit c422734

Please sign in to comment.