Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Job promise is an ECMAScript type, not WebIDL #1731

Open
ADKaster opened this issue Oct 3, 2024 · 2 comments
Open

Job promise is an ECMAScript type, not WebIDL #1731

ADKaster opened this issue Oct 3, 2024 · 2 comments

Comments

@ADKaster
Copy link

ADKaster commented Oct 3, 2024

Is there any meaningful reason that the job promise (https://w3c.github.io/ServiceWorker/#dfn-job-promise) is linked to the ECMAScript Promise definition (https://tc39.es/ecma262/#sec-promise-objects) rather than WebIDL Promise, AKA ECMAScript PromiseCapability (https://webidl.spec.whatwg.org/#idl-promise) ?

I noticed that none of the Job promise-related AOs reference the WebIDL promise AOs, and just say to "resolve" or "reject" the promise.

I would expect that the spec would call out to the resolve (https://webidl.spec.whatwg.org/#resolve), reject (https://webidl.spec.whatwg.org/#reject) and react (https://webidl.spec.whatwg.org/#dfn-perform-steps-once-promise-is-settled) WebIDL operations as necessary.

@mkruisselbrink
Copy link
Collaborator

I'd say the main reason is that most of this spec predates webidl having all those operations, and nobody ever got around to updating the spec when webidl started including better support for promise related operations...

@ADKaster
Copy link
Author

ADKaster commented Oct 3, 2024

Makes sense, thanks! I'll see if I can wrangle up a PR in the coming days then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants