w3c / w3c/ServiceWorker

Job promise is an ECMAScript type, not WebIDL

Open
#1,731 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Bikeshed
Stars
3.6k
Forks
324
Avg merge
14d 22h
Merged PRs (30d)
1

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the job promise definition and its related algorithms in the Service Worker specification, then compare them with the linked WebIDL Promise operations and ECMAScript Promise definition. Done means the specification's relationship between these definitions and any needed resolve, reject, or react references is explicitly settled.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.