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

Add transformer.cancel method to TransformStream constructor #25519

Merged
merged 4 commits into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions api/TransformStream.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,50 @@
"standard_track": true,
"deprecated": false
}
},
"cancel": {
"__compat": {
"description": "`transformer.cancel` method",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that cancel is the key in the parameter object passed to the TransformStream constructor, it confuses me slightly that this is called a method (even if the spec uses this terminology). How about:

Suggested change
"cancel": {
"__compat": {
"description": "`transformer.cancel` method",
"transformer_cancel_callback": {
"__compat": {
"description": "`transformer.cancel` callback",

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The MDN articles for the ReadableStream/WritableStream/TransformStream constructors as well as the streams guides also talk about "methods", so I tried to be consistent with those. Although the specification does use the name TransformerCancelCallback for the type of that method... 😅

I think I'll stick with "method" for now. I'll make the feature name a bit more specific though, like you suggested.

"spec_url": "https://streams.spec.whatwg.org/#dom-transformer-cancel",
"support": {
"chrome": {
"version_added": false,
"impl_url": "https://crbug.com/40283531"
},
"chrome_android": "mirror",
"deno": {
"version_added": "1.38"
},
"edge": "mirror",
"firefox": {
"version_added": false,
"impl_url": "https://bugzil.la/1856103"
},
"firefox_android": "mirror",
"ie": {
"version_added": false
},
"nodejs": {
"version_added": "20.14.0"
},
MattiasBuelens marked this conversation as resolved.
Show resolved Hide resolved
"oculus": "mirror",
"opera": "mirror",
"opera_android": "mirror",
"safari": {
"version_added": false,
"impl_url": "https://webkit.org/b/262424"
},
"safari_ios": "mirror",
"samsunginternet_android": "mirror",
"webview_android": "mirror",
"webview_ios": "mirror"
},
"status": {
"experimental": true,
"standard_track": true,
"deprecated": false
}
}
}
},
"readable": {
Expand Down
7 changes: 7 additions & 0 deletions browsers/nodejs.json
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,13 @@
"engine": "V8",
"engine_version": "11.3"
},
"20.14.0": {
"release_date": "2024-05-28",
"release_notes": "https://nodejs.org/en/blog/release/v20.14.0",
"status": "retired",
"engine": "V8",
"engine_version": "11.3"
},
"20.16.0": {
"release_date": "2024-07-24",
"release_notes": "https://nodejs.org/en/blog/release/v20.16.0",
Expand Down
Loading