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

Specifications which use "invoke a callback function" should be updated to specify their exception handling behavior. #1425

Open
15 of 16 tasks
jeremyroman opened this issue Aug 2, 2024 · 0 comments

Comments

@jeremyroman
Copy link
Contributor

jeremyroman commented Aug 2, 2024

What is the issue with the Web IDL Standard?

This continues from #1423 (comment).

The following specifications may need to be updated, per webdex:

@jeremyroman jeremyroman changed the title Specifications which use "invoke the callback function" should be updated to specify their exception handling behavior. Specifications which use "invoke a callback function" should be updated to specify their exception handling behavior. Aug 2, 2024
jeremyroman added a commit to jeremyroman/html that referenced this issue Aug 2, 2024
It's now required for non-promise-returning uses to specify how
exceptions are handled. Specifying the argument list is also made more
consistent, using the shorthand syntax for lists where appropriate.

Part of whatwg/webidl#1425.
jeremyroman added a commit to jeremyroman/dom that referenced this issue Aug 2, 2024
The single use, in mutation observers, no longer needs to deal with
reporting the exception itself, but simply request that WebIDL do so.

Part of whatwg/webidl#1425.
jeremyroman added a commit to jeremyroman/whatwg-notifications that referenced this issue Aug 2, 2024
The single use no longer needs to report the exception itself.

Part of whatwg/webidl#1425.
jeremyroman added a commit to jeremyroman/streams that referenced this issue Aug 2, 2024
The only use which is not promise-returning is the "start" algorithm,
which should rethrow the exception (so it can in turn be rethrown from
the ReadableStream constructor.

Part of whatwg/webidl#1425.
jeremyroman added a commit to jeremyroman/webxr that referenced this issue Aug 2, 2024
This algorithm can now handle the need to report an exception inside an
XR animation frame callback.

Part of whatwg/webidl#1425.
jeremyroman added a commit to jeremyroman/video-rvfc that referenced this issue Aug 2, 2024
This algorithm can now handle the need to report an exception thrown by
the callback. Some small tweaks are made for consistency with other
specifications.

Part of whatwg/webidl#1425.
jeremyroman added a commit to jeremyroman/entries-api that referenced this issue Aug 2, 2024
It seems to be intended here that errors within these callbacks are
reported, rather than rethrown. Making an explicit choice is now
required.

The argument list is now also wrapped in the list shorthand, since a
single object is not, itself, a valid arguments list.

Part of whatwg/webidl#1425.
ricea pushed a commit to whatwg/streams that referenced this issue Aug 5, 2024
The only use which is not promise-returning is the "start" algorithm,
which should rethrow the exception (so it can in turn be rethrown from
the ReadableStream constructor.

Part of whatwg/webidl#1425.
domenic pushed a commit to whatwg/dom that referenced this issue Aug 5, 2024
The single use, in mutation observers, no longer needs to deal with reporting the exception itself, but simply request that Web IDL do so.

Part of whatwg/webidl#1425.
domenic pushed a commit to whatwg/notifications that referenced this issue Aug 5, 2024
The single use no longer needs to report the exception itself.

Part of whatwg/webidl#1425.
toji pushed a commit to immersive-web/webxr that referenced this issue Aug 5, 2024
This algorithm can now handle the need to report an exception inside an
XR animation frame callback.

Part of whatwg/webidl#1425.
domenic added a commit to whatwg/html that referenced this issue Aug 7, 2024
It's now required for non-promise-returning uses to specify how exceptions are handled. Also make the way it is called more consistent.

Part of whatwg/webidl#1425.

Co-authored-by: Domenic Denicola <[email protected]>
JinDX added a commit to JinDX/htmlspecs.com that referenced this issue Aug 7, 2024
…49a5fbc4f

更新了 Web IDL 中“调用回调函数”的使用方式
现在,对于不返回 promise 的使用场景,必须指定如何处理异常。同时,使其调用方式更加一致。
部分更新来自 whatwg/webidl#1425。

合作作者: Domenic Denicola [email protected]
jeremyroman added a commit to jeremyroman/w3c-reporting that referenced this issue Aug 8, 2024
This algorithm can now handle the need to report an exception thrown by the callback. Some small tweaks are made for consistency with other specifications.

Part of whatwg/webidl#1425.
jeremyroman added a commit to jeremyroman/w3c-geolocation that referenced this issue Aug 8, 2024
This algorithm can now handle the need to report an exception thrown by the callback. Some small tweaks are made for consistency with other specifications.

Part of whatwg/webidl#1425.
jeremyroman added a commit to jeremyroman/scheduling-apis that referenced this issue Aug 9, 2024
jeremyroman added a commit to jeremyroman/css-houdini-drafts that referenced this issue Aug 9, 2024
Rethrowing is no longer implicit (since reporting is frequently what's
desired). Here handling the exception is intended, so this is a very
small change.

Also included are the various changes required to make these specs build
and fixes to some places nearby where a clearly incorrect definition was
linked to.

Part of whatwg/webidl#1425.
jeremyroman added a commit to jeremyroman/shared-storage that referenced this issue Aug 9, 2024
Unforunately this isn't purely editorial, because in the process of
adjusting the use of "invoke" a number of other things needed to be
clarified.

Namely:
* the operation map now holds JS function objects (i.e., anything with
  [[Call]])
* these function objects are converted to a specific IDL types only
  when they are about to be invoked
* the select URL algorithm reacts to the promise rather than expecting
  its value (or rejection reason) to be immediately available

Part of whatwg/webidl#1425.
reillyeon pushed a commit to w3c/geolocation that referenced this issue Aug 9, 2024
This algorithm can now handle the need to report an exception thrown by the callback. Some small tweaks are made for consistency with other specifications.

Part of whatwg/webidl#1425.
shaseley pushed a commit to WICG/scheduling-apis that referenced this issue Aug 12, 2024
clelland pushed a commit to w3c/reporting that referenced this issue Aug 13, 2024
This algorithm can now handle the need to report an exception thrown by the callback. Some small tweaks are made for consistency with other specifications.

Part of whatwg/webidl#1425.
xyaoinum pushed a commit to WICG/shared-storage that referenced this issue Aug 20, 2024
Unforunately this isn't purely editorial, because in the process of
adjusting the use of "invoke" a number of other things needed to be
clarified.

Namely:
* the operation map now holds JS function objects (i.e., anything with
  [[Call]])
* these function objects are converted to a specific IDL types only
  when they are about to be invoked
* the select URL algorithm reacts to the promise rather than expecting
  its value (or rejection reason) to be immediately available

Part of whatwg/webidl#1425.
tabatkins added a commit to w3c/css-houdini-drafts that referenced this issue Aug 25, 2024
* Editorial: Update use of WebIDL "invoke a callback function"

Rethrowing is no longer implicit (since reporting is frequently what's
desired). Here handling the exception is intended, so this is a very
small change.

Also included are the various changes required to make these specs build
and fixes to some places nearby where a clearly incorrect definition was
linked to.

Part of whatwg/webidl#1425.

* Use link-defaults rather than a manual anchor

---------

Co-authored-by: Tab Atkins Jr. <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant