WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: document/js-api/index.bs
+10-8Lines changed: 10 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -469,15 +469,17 @@ The verification of WebAssembly type requirements is deferred to the
469
469
To <dfn>instantiate a promise of a module</dfn> |promiseOfModule| with imports |importObject|, perform the following steps:
470
470
471
471
1. Let |promise| be [=a new promise=].
472
-
1. [=Upon fulfillment=] of |promiseOfModule| with value |module|:
473
-
1. [=asynchronously instantiate a WebAssembly module|Instantiate the WebAssembly module=] |module| importing |importObject|, and let |innerPromise| be the result.
474
-
1. [=Upon fulfillment=] of |innerPromise| with value |instance|.
475
-
1. Let |result| be the {{WebAssemblyInstantiatedSource}} value «[ "{{WebAssemblyInstantiatedSource/module}}" → |module|, "{{WebAssemblyInstantiatedSource/instance}}" → |instance| ]».
476
-
1. [=Resolve=] |promise| with |result|.
477
-
1. [=Upon rejection=] of |innerPromise| with reason |reason|:
472
+
1. [=React=] to |promiseOfModule|:
473
+
* If |promiseOfModule| was fulfilled with value |module|:
474
+
1. [=asynchronously instantiate a WebAssembly module|Instantiate the WebAssembly module=] |module| importing |importObject|, and let |innerPromise| be the result.
475
+
1. [=React=] to |innerPromise|:
476
+
* If |innerPromise| was fulfilled with value |instance|.
477
+
1. Let |result| be the {{WebAssemblyInstantiatedSource}} value «[ "{{WebAssemblyInstantiatedSource/module}}" → |module|, "{{WebAssemblyInstantiatedSource/instance}}" → |instance| ]».
478
+
1. [=Resolve=] |promise| with |result|.
479
+
* If |innerPromise| was rejected with reason |reason|:
480
+
1. [=Reject=] |promise| with |reason|.
481
+
* If |promiseOfModule| was rejected with reason |reason|:
478
482
1. [=Reject=] |promise| with |reason|.
479
-
1. [=Upon rejection=] of |promiseOfModule| with reason |reason|:
0 commit comments