Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Specify that returned Promises are created in the relevant realm
Note that these semantics differ from JavaScript async functions, which create a Promise in the current Realm. Verified in Chromium and Firefox that HTMLImageElement.decode and CustomElementsRegistry.whenDefined return Promise instances from the relevant realm. (I'm not sure what's the preferred way to typeset "this", or if it would be preferred to thread it explicitly through the algorithm. Also, it's not quite necessary to use the relevant Promise.resolve function, since resolve effectively uses the relevant realm of its receiver(!)) Resolves part of whatwg#135
- Loading branch information