[Bug 23143] New: Add an "adopt" hook for Promises

[email protected]
Newsgroups gmane.comp.web.dom.general
Message-ID <[email protected]/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=23143

            Bug ID: 23143
           Summary: Add an "adopt" hook for Promises
    Classification: Unclassified
           Product: WebAppsWG
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DOM
          Assignee: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]
                CC: [email protected], [email protected]

The Promises spec currently has API hooks for fulfilling and rejecting a
promise.  It should also have a hook for adopting a promise.

Use-case: I'm returning a promise from an operation in the Font Load Events
API.  Sometimes it'll be rejected quickly and directly, so I need to have a
handle for the promise itself.  If all goes well, though, the result should be
as if Promise.every() was called on a spec-defined list of other promises,
which requires me to have the original returned promise adopt the result of the
Promise.every() algorithm (once it's defined in a spec fashion that can be
safely invoked).

-- 
You are receiving this mail because:
You are on the CC list for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.