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

Improve AbortController polyfill to be more realistic #35

Open
sujayakar opened this issue Feb 4, 2025 · 0 comments
Open

Improve AbortController polyfill to be more realistic #35

sujayakar opened this issue Feb 4, 2025 · 0 comments

Comments

@sujayakar
Copy link
Contributor

currently we have an AbortController stub (

global.AbortController = AbortController;
) which doesn't work well. instead of throwing uncatchable developer errors, its properties are undefined. we can't change it to throw errors because that would break existing usage. but having undefined properties is unexpected and can cause subtler errors and bugs.

see deno's implementation for inspiration: https://github.com/denoland/node_test/blob/1c9511e584eb9d465bcd4b1e6c05ecedf7f15549/test/parallel/test-abortcontroller.js#L39
https://github.com/denoland/deno/blob/28834a89bb85d708ec7b67ab844724e1221cc6cf/ext/web/03_abort_signal.js#L290
https://github.com/denoland/deno/blob/28834a89bb85d708ec7b67ab844724e1221cc6cf/ext/web/03_abort_signal.js#L4

we'll want to have web spec compliance tests in isolate/tests

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

1 participant