Skip to content

Commit

Permalink
Editorial: link Promise<T> type throughout
Browse files Browse the repository at this point in the history
Fixes #9987.
  • Loading branch information
tawandamoyo authored Mar 15, 2024
1 parent 335cf0c commit 6b3cd9a
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -2852,6 +2852,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
<li><dfn data-x="idl-Function" data-x-href="https://webidl.spec.whatwg.org/#common-Function"><code>Function</code></dfn></li>
<li><dfn data-x="idl-long" data-x-href="https://webidl.spec.whatwg.org/#idl-long"><code>long</code></dfn></li>
<li><dfn data-x="idl-object" data-x-href="https://webidl.spec.whatwg.org/#idl-object"><code>object</code></dfn></li>
<li><dfn data-x="idl-Promise" data-x-href="https://webidl.spec.whatwg.org/#idl-promise"><code>Promise</code></dfn></li>
<li><dfn data-x="idl-Uint8ClampedArray" data-x-href="https://webidl.spec.whatwg.org/#idl-Uint8ClampedArray"><code>Uint8ClampedArray</code></dfn></li>
<li><dfn data-x="idl-unrestricted-double" data-x-href="https://webidl.spec.whatwg.org/#idl-unrestricted-double"><code>unrestricted double</code></dfn></li>
<li><dfn data-x="idl-unsigned-long" data-x-href="https://webidl.spec.whatwg.org/#idl-unsigned-long"><code>unsigned long</code></dfn></li>
Expand Down Expand Up @@ -29018,7 +29019,7 @@ interface <dfn interface>HTMLImageElement</dfn> : <span>HTMLElement</span> {
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-img-loading">loading</span>;
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-img-fetchPriority">fetchPriority</span>;

Promise&lt;undefined&gt; <span data-x="dom-img-decode">decode</span>();
<span data-x="idl-Promise">Promise</span>&lt;undefined&gt; <span data-x="dom-img-decode">decode</span>();

// <a href="#HTMLImageElement-partial">also has obsolete members</a>
};</code></pre>
Expand Down Expand Up @@ -35528,7 +35529,7 @@ interface <dfn interface>HTMLMediaElement</dfn> : <span>HTMLElement</span> {
readonly attribute boolean <span data-x="dom-media-ended">ended</span>;
[<span>CEReactions</span>] attribute boolean <span data-x="dom-media-autoplay">autoplay</span>;
[<span>CEReactions</span>] attribute boolean <span data-x="dom-media-loop">loop</span>;
Promise&lt;undefined&gt; <span data-x="dom-media-play">play</span>();
<span data-x="idl-Promise">Promise</span>&lt;undefined&gt; <span data-x="dom-media-play">play</span>();
undefined <span data-x="dom-media-pause">pause</span>();

// controls
Expand Down Expand Up @@ -70214,7 +70215,7 @@ interface <dfn interface>OffscreenCanvas</dfn> : <span>EventTarget</span> {

<span>OffscreenRenderingContext</span>? <span data-x="dom-OffscreenCanvas-getContext">getContext</span>(<span>OffscreenRenderingContextId</span> contextId, optional any options = null);
<span>ImageBitmap</span> <span data-x="dom-OffscreenCanvas-transferToImageBitmap">transferToImageBitmap</span>();
Promise&lt;<span>Blob</span>> <span data-x="dom-OffscreenCanvas-convertToBlob">convertToBlob</span>(optional <span>ImageEncodeOptions</span> options = {});
<span data-x="idl-Promise">Promise</span>&lt;<span>Blob</span>> <span data-x="dom-OffscreenCanvas-convertToBlob">convertToBlob</span>(optional <span>ImageEncodeOptions</span> options = {});

attribute <span>EventHandler</span> <span data-x="handler-offscreencanvas-oncontextlost">oncontextlost</span>;
attribute <span>EventHandler</span> <span data-x="handler-offscreencanvas-oncontextrestored">oncontextrestored</span>;
Expand Down Expand Up @@ -72013,7 +72014,7 @@ interface <dfn interface>CustomElementRegistry</dfn> {
[<span>CEReactions</span>] undefined <span data-x="dom-CustomElementRegistry-define">define</span>(DOMString name, <span>CustomElementConstructor</span> constructor, optional <span>ElementDefinitionOptions</span> options = {});
(<span>CustomElementConstructor</span> or undefined) <span data-x="dom-CustomElementRegistry-get">get</span>(DOMString name);
DOMString? <span data-x="dom-CustomElementRegistry-getName">getName</span>(CustomElementConstructor constructor);
Promise&lt;<span>CustomElementConstructor</span>&gt; <span data-x="dom-CustomElementRegistry-whenDefined">whenDefined</span>(DOMString name);
<span data-x="idl-Promise">Promise</span>&lt;<span>CustomElementConstructor</span>&gt; <span data-x="dom-CustomElementRegistry-whenDefined">whenDefined</span>(DOMString name);
[<span>CEReactions</span>] undefined <span data-x="dom-CustomElementRegistry-upgrade">upgrade</span>(<span>Node</span> root);
};

Expand Down Expand Up @@ -91771,8 +91772,8 @@ dictionary <dfn dictionary>NavigationReloadOptions</dfn> : <span>NavigationOptio
};

dictionary <dfn dictionary>NavigationResult</dfn> {
Promise&lt;<span>NavigationHistoryEntry</span>> <dfn dict-member for="NavigationResult" data-x="dom-NavigationResult-committed">committed</dfn>;
Promise&lt;<span>NavigationHistoryEntry</span>> <dfn dict-member for="NavigationResult" data-x="dom-NavigationResult-finished">finished</dfn>;
<span data-x="idl-Promise">Promise</span>&lt;<span>NavigationHistoryEntry</span>> <dfn dict-member for="NavigationResult" data-x="dom-NavigationResult-committed">committed</dfn>;
<span data-x="idl-Promise">Promise</span>&lt;<span>NavigationHistoryEntry</span>> <dfn dict-member for="NavigationResult" data-x="dom-NavigationResult-finished">finished</dfn>;
};

enum <dfn enum>NavigationHistoryBehavior</dfn> {
Expand Down Expand Up @@ -93617,7 +93618,7 @@ const p2 = navigation.navigate(url2).finished;</code></pre>
interface <dfn interface>NavigationTransition</dfn> {
readonly attribute <span>NavigationType</span> <span data-x="dom-NavigationTransition-navigationType">navigationType</span>;
readonly attribute <span>NavigationHistoryEntry</span> <span data-x="dom-NavigationTransition-from">from</span>;
readonly attribute Promise&lt;undefined> <span data-x="dom-NavigationTransition-finished">finished</span>;
readonly attribute <span data-x="idl-Promise">Promise</span>&lt;undefined> <span data-x="dom-NavigationTransition-finished">finished</span>;
};</code></pre>

</div>
Expand Down Expand Up @@ -93846,7 +93847,7 @@ enum <dfn enum>NavigationScrollBehavior</dfn> {
"<dfn enum-value for="NavigationScrollBehavior" data-x="dom-NavigationScrollBehavior-manual">manual</dfn>"
};

callback <dfn callback>NavigationInterceptHandler</dfn> = Promise&lt;undefined> ();</code></pre>
callback <dfn callback>NavigationInterceptHandler</dfn> = <span data-x="idl-Promise">Promise</span>&lt;undefined> ();</code></pre>

<dl class="domintro">
<dt><code data-x=""><var>event</var>.<span subdfn data-x="dom-NavigateEvent-navigationType">navigationType</span></code></dt>
Expand Down Expand Up @@ -107710,7 +107711,7 @@ dictionary <dfn dictionary>PromiseRejectionEventInit</dfn> : <span>EventInit</sp
was initialized to. It represents the promise which this notification is about.</p>

<p class="note">Because of how Web IDL conversion rules for <code
data-x="">Promise&lt;<var>T</var>></code> types always wrap the input into a new promise, the
data-x=""><span data-x="idl-Promise">Promise</span>&lt;<var>T</var>></code> types always wrap the input into a new promise, the
<code data-x="dom-PromiseRejectionEvent-promise">promise</code> attribute is of type <code
data-x="idl-object">object</code> instead, which is more appropriate for representing an opaque
handle to the original promise object.</p>
Expand Down Expand Up @@ -111706,8 +111707,8 @@ interface mixin <dfn interface>WindowOrWorkerGlobalScope</dfn> {
undefined <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 = {});
Promise&lt;<span>ImageBitmap</span>&gt; <span data-x="dom-createImageBitmap">createImageBitmap</span>(<span>ImageBitmapSource</span> image, long sx, long sy, long sw, long sh, optional <span>ImageBitmapOptions</span> options = {});
<span data-x="idl-Promise">Promise</span>&lt;<span>ImageBitmap</span>&gt; <span data-x="dom-createImageBitmap">createImageBitmap</span>(<span>ImageBitmapSource</span> image, optional <span>ImageBitmapOptions</span> options = {});
<span data-x="idl-Promise">Promise</span>&lt;<span>ImageBitmap</span>&gt; <span data-x="dom-createImageBitmap">createImageBitmap</span>(<span>ImageBitmapSource</span> image, long sx, long sy, long sw, long sh, optional <span>ImageBitmapOptions</span> options = {});

// structured cloning
any <span data-x="dom-structuredClone">structuredClone</span>(any value, optional <span>StructuredSerializeOptions</span> options = {});
Expand Down Expand Up @@ -119582,7 +119583,7 @@ interface <dfn interface>WorkletGlobalScope</dfn> {};</code></pre>

<pre><code class="idl">[Exposed=Window, SecureContext]
interface <dfn interface>Worklet</dfn> {
[NewObject] Promise&lt;undefined> <span data-x="dom-Worklet-addModule">addModule</span>(USVString moduleURL, optional <span>WorkletOptions</span> options = {});
[NewObject] <span data-x="idl-Promise">Promise</span>&lt;undefined> <span data-x="dom-Worklet-addModule">addModule</span>(USVString moduleURL, optional <span>WorkletOptions</span> options = {});
};

dictionary <dfn dictionary>WorkletOptions</dfn> {
Expand Down

0 comments on commit 6b3cd9a

Please sign in to comment.