- From: Jeremy Roman <notifications@github.com>
- Date: Tue, 30 Jul 2024 11:50:13 -0700
- To: whatwg/webidl <webidl@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/webidl/issues/1423/2258993403@github.com>
A survey of the current uses of these algorithms indexed by webdex. Note that promise-returning callback types cannot actually throw, because WebIDL turns this into a promise rejection internally. | algorithm | spec | topic | catches and reports | rethrows | is promise | other | notes | | --- | --- | --- | --- | --- | --- | --- | --- | | invoke | DOM | mutation observers | • | | | | | | invoke | HTML | canvas toBlob | | • | | | | | invoke | HTML | custom element reactions | • | | | | | | invoke | HTML | navigate event | | | • | | | | invoke | HTML | event handler attribute | | • | | | | | invoke | HTML | timers | • | | | | | | invoke | HTML | microtask queuing | • | | | | | | invoke | HTML | animation frames | • | | | | | | invoke | HTML | worklet registration example | | | | • | probably intended to rethrow but unclear | | invoke | Notifications | request | • | | | | | | invoke | Streams | | | • | | | | | invoke | Files and Directories | | | | | • | unclear, but likely should report (assuming browsers do) | | invoke | Prioritized Task Scheduling | postTask | | | | • | catches and rejects a promise; might be able to change to use a `Promise<any>` return type instead of `any` to have WebIDL handle this | | invoke | Shared Storage | select-url result index | | | | • | catches and rejects a promise (in a task) | | invoke | Shared Storage | run() | | | • | | not entirely certain this is true; the callback type is oddly abstract | | invoke | Video rVFC | | • | | | | | | invoke | Web Smart Card | | | | • | | | | invoke | CSS Layout API | intrinsic sizes | | | | • | unclear, but likely should report | | invoke | CSS Layout API | layout callback | | | | • | unclear, but likely should report | | invoke | CSS Paint API | | | | | • | unclear | | invoke | CSS View Transitions | update | | | • | | | | invoke | Geolocation | acquire | | | | • | unclear, but likely should report | | invoke | Reporting API | | • | | | | | | invoke | Web Locks | | | | • | | | | invoke | WebXR | XR animation frame | • | | | | | | call a user object's operation | DOM | handleEvent | | | | • | reports but also sets a special flag for IndexedDB | | construct | DOM | sync create custom element | | | | • | reports but also does other things | | construct | HTML | upgrade custom element | | | | • | reports but also does other things | | construct | SharedStorage | register | | | | • | unclear but should probably rethrow | | construct | Web Audio | instantiate processor | | | | • | special handling to fire `processorerror` | Excluded from this list are references which do not invoke these algorithms (but mention or modify it). The "catch and report" cases naturally don't specify the global (except HTML, where this was part of whatwg/html#10404). It's likely that the callback's realm's global is appropriate, though for each a cursory check of existing browser behavior would be nice. WebIDL also doesn't have many normative references to HTML. This wouldn't be the first, though. Do you still think this should be a boolean defaulting to reporting, or should this be a required parameter? Or maybe some kind of conditionally required parameter, where it must be specified unless it's a promise-returning callback? -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/webidl/issues/1423#issuecomment-2258993403 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/webidl/issues/1423/2258993403@github.com>
Received on Tuesday, 30 July 2024 18:50:17 UTC