From 6b3cd9acb658cc0c0d60af49522a38214209b39f Mon Sep 17 00:00:00 2001 From: Tawanda Moyo Date: Fri, 15 Mar 2024 10:02:24 +0200 Subject: [PATCH] Editorial: link Promise type throughout Fixes #9987. --- source | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/source b/source index 402cad4fced..0fd5aee694c 100644 --- a/source +++ b/source @@ -2852,6 +2852,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
  • Function
  • long
  • object
  • +
  • Promise
  • Uint8ClampedArray
  • unrestricted double
  • unsigned long
  • @@ -29018,7 +29019,7 @@ interface HTMLImageElement : HTMLElement { [CEReactions] attribute DOMString loading; [CEReactions] attribute DOMString fetchPriority; - Promise<undefined> decode(); + Promise<undefined> decode(); // also has obsolete members }; @@ -35528,7 +35529,7 @@ interface HTMLMediaElement : HTMLElement { readonly attribute boolean ended; [CEReactions] attribute boolean autoplay; [CEReactions] attribute boolean loop; - Promise<undefined> play(); + Promise<undefined> play(); undefined pause(); // controls @@ -70214,7 +70215,7 @@ interface OffscreenCanvas : EventTarget { OffscreenRenderingContext? getContext(OffscreenRenderingContextId contextId, optional any options = null); ImageBitmap transferToImageBitmap(); - Promise<Blob> convertToBlob(optional ImageEncodeOptions options = {}); + Promise<Blob> convertToBlob(optional ImageEncodeOptions options = {}); attribute EventHandler oncontextlost; attribute EventHandler oncontextrestored; @@ -72013,7 +72014,7 @@ interface CustomElementRegistry { [CEReactions] undefined define(DOMString name, CustomElementConstructor constructor, optional ElementDefinitionOptions options = {}); (CustomElementConstructor or undefined) get(DOMString name); DOMString? getName(CustomElementConstructor constructor); - Promise<CustomElementConstructor> whenDefined(DOMString name); + Promise<CustomElementConstructor> whenDefined(DOMString name); [CEReactions] undefined upgrade(Node root); }; @@ -91771,8 +91772,8 @@ dictionary NavigationReloadOptions : NavigationOptio }; dictionary NavigationResult { - Promise<NavigationHistoryEntry> committed; - Promise<NavigationHistoryEntry> finished; + Promise<NavigationHistoryEntry> committed; + Promise<NavigationHistoryEntry> finished; }; enum NavigationHistoryBehavior { @@ -93617,7 +93618,7 @@ const p2 = navigation.navigate(url2).finished; interface NavigationTransition { readonly attribute NavigationType navigationType; readonly attribute NavigationHistoryEntry from; - readonly attribute Promise<undefined> finished; + readonly attribute Promise<undefined> finished; }; @@ -93846,7 +93847,7 @@ enum NavigationScrollBehavior { "manual" }; -callback NavigationInterceptHandler = Promise<undefined> (); +callback NavigationInterceptHandler = Promise<undefined> ();
    event.navigationType
    @@ -107710,7 +107711,7 @@ dictionary PromiseRejectionEventInit : EventInit

    Because of how Web IDL conversion rules for Promise<T> types always wrap the input into a new promise, the + data-x="">Promise<T> types always wrap the input into a new promise, the promise attribute is of type object instead, which is more appropriate for representing an opaque handle to the original promise object.

    @@ -111706,8 +111707,8 @@ interface mixin WindowOrWorkerGlobalScope { undefined queueMicrotask(VoidFunction callback); // ImageBitmap - Promise<ImageBitmap> createImageBitmap(ImageBitmapSource image, optional ImageBitmapOptions options = {}); - Promise<ImageBitmap> createImageBitmap(ImageBitmapSource image, long sx, long sy, long sw, long sh, optional ImageBitmapOptions options = {}); + Promise<ImageBitmap> createImageBitmap(ImageBitmapSource image, optional ImageBitmapOptions options = {}); + Promise<ImageBitmap> createImageBitmap(ImageBitmapSource image, long sx, long sy, long sw, long sh, optional ImageBitmapOptions options = {}); // structured cloning any structuredClone(any value, optional StructuredSerializeOptions options = {}); @@ -119582,7 +119583,7 @@ interface WorkletGlobalScope {};
    [Exposed=Window, SecureContext]
     interface Worklet {
    -  [NewObject] Promise<undefined> addModule(USVString moduleURL, optional WorkletOptions options = {});
    +  [NewObject] Promise<undefined> addModule(USVString moduleURL, optional WorkletOptions options = {});
     };
     
     dictionary WorkletOptions {