Closed Bug 1032763 Opened 6 years ago Closed 6 years ago
add an Is
Pending method to Promise objects
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???
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: 6 years ago
Resolution: --- → WONTFIX
Attachment #8448660 - Flags: review?(bzbarsky) → review-
You need to log in before you can comment on or make changes to this bug.