Skip to content

Fix PromiseRejectionEvent's promise attribute - #9897

Merged
domenic merged 1 commit into
mainfrom
promiserejectionevent-object
Dec 12, 2023
Merged

domenic merged 1 commit into
mainfrom
promiserejectionevent-object

Conversation

@domenic

@domenic domenic commented Oct 31, 2023 •

Copy link
Copy Markdown
Member

As discovered in whatwg/streams#1298 (comment), Promise is actually not an appropriate type for it.


/webappapis.html ( diff )

As discovered in whatwg/streams#1298 (comment), Promise<T> is actually not an appropriate type for it.
@domenic
domenic requested a review from annevk November 2, 2023 06:05

@domfarolino domfarolino left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I came across this accidentally, but thought I'd take a look.

Comment thread source
data-x="">Promise&lt;<var>T</var>></code> types always wrap the input into a new promise, the
<code data-x="dom-PromiseRejectionEvent-promise">promise</code> attribute is of type <code
data-x="idl-object">object</code> instead, which is more appropriate for representing an opaque
handle to the original promise object.</p>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if it is more appropriate to link to https://webidl.spec.whatwg.org/#idl-promise where you write "promise" or not, but I noticed you did do that for "object" in this same note. (Of course "promise" is more conversational than "object" anyways.)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think linking Promise<T> would be reasonable, but "promise" isn't connected enough to that definition.

I'll file another editorial issue for linking Promise<T> globally.

@domenic
domenic merged commit a20ca78 into main Dec 12, 2023
@domenic
domenic deleted the promiserejectionevent-object branch December 12, 2023 03:35
bcardarella added a commit to zig-whatwg/crane that referenced this pull request Nov 22, 2026
…rendering, fetch-abort follows-majority

Angular's Crane column comes from its own Bazel run, where the zone.js
targets run (lane fw2):
- unhandledrejection (both zone targets): follows-spec, angular/angular#72159
  and whatwg/html#9897 - Firefox 159 fails it as Crane does;
- HTMLCanvasElement.toBlob: rendering - it draws on a 2D canvas first, and
  canvas pixels are 0.2 (the user's ruling, 2026-11-21);
- cancel fetch / cancel fetchTask (both targets): follows-majority - Chrome
  157, Firefox 159, Safari 27 and Crane log the same 10 zone tasks where the
  spec expects 8; it skips itself where the UA says Safari, and Firefox,
  which runs it, fails it alike (lane fw2's probe).
The svg on-properties failures are fixed in Crane instead (the codegen
include removal). File granted by main 12:38 PM ET.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants