Closed Bug 1032763 Opened 11 years ago Closed 11 years ago

add an IsPending method to Promise objects

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: heycam, Assigned: heycam)

References

Details

Attachments

(1 file)

Attached patch patchSplinter Review
I want to be able to tell if a Promise is pending (as opposed to resolved/rejected) so I can implement the 'Whenever one or more available font faces for a given FontFaceSet change their status attribute to "loading"' algorithm in http://dev.w3.org/csswg/css-font-loading/#FontFaceSet-events for bug 1028497.
Attachment #8448660 - Flags: review?(bzbarsky)
Comment on attachment 8448660 [details] [diff] [review] patch I'm not a huge fan of building this on top of what is currently unobservable state. Does the spec actually require observing internal promise state???
Flags: needinfo?(cam)
As Tab points out in http://lists.w3.org/Archives/Public/www-style/2014Jun/0498.html I can just keep some separate state to know whether I have already called MaybeResolve/MaybeReject on the Promise, so strictly I don't need this IsPending method. Upon reflection I think this is the way to go.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Flags: needinfo?(cam)
Resolution: --- → WONTFIX
Attachment #8448660 - Flags: review?(bzbarsky) → review-
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: