Skip to content

Commit

Permalink
Editorial: use VoidFunction instead of Function in queueMicrotask()
Browse files Browse the repository at this point in the history
queueMicrotask() doesn't pass any arguments or return any values, so
VoidFunction is a better fit than Function. This does not change the
processing model, but is easier for implementers and code generators.
  • Loading branch information
yuki3 authored and domenic committed Sep 12, 2018
1 parent e92c28d commit e000f5e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source
Original file line number Diff line number Diff line change
Expand Up @@ -2951,6 +2951,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
<li><dfn data-x="idl-unrestricted-double" data-x-href="https://heycam.github.io/webidl/#idl-unrestricted-double"><code>unrestricted double</code></dfn></li>
<li><dfn data-x="idl-unsigned-long" data-x-href="https://heycam.github.io/webidl/#idl-unsigned-long"><code>unsigned long</code></dfn></li>
<li><dfn data-x="idl-USVString" data-x-href="https://heycam.github.io/webidl/#idl-USVString"><code>USVString</code></dfn></li>
<li><dfn data-x="idl-VoidFunction" data-x-href="https://heycam.github.io/webidl/#VoidFunction"><code>VoidFunction</code></dfn></li>
</ul>

<p>The term <dfn data-x-href="https://heycam.github.io/webidl/#dfn-throw">throw</dfn> in this
Expand Down Expand Up @@ -90673,7 +90674,7 @@ interface mixin <dfn>WindowOrWorkerGlobalScope</dfn> {
void <span data-x="dom-clearInterval">clearInterval</span>(optional long handle = 0);

// microtask queuing
void <span data-x="dom-queueMicrotask">queueMicrotask</span>(<span data-x="idl-Function">Function</span> <var>callback</var>);
void <span data-x="dom-queueMicrotask">queueMicrotask</span>(<span data-x="idl-VoidFunction">VoidFunction</span> <var>callback</var>);

// ImageBitmap
Promise&lt;<span>ImageBitmap</span>&gt; <span data-x="dom-createImageBitmap">createImageBitmap</span>(<span>ImageBitmapSource</span> image, optional <span>ImageBitmapOptions</span> options);
Expand Down

0 comments on commit e000f5e

Please sign in to comment.