-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Open
Labels
data:jsCompat data for JS/ECMAScript features. https://developer.mozilla.org/docs/Web/JavaScriptCompat data for JS/ECMAScript features. https://developer.mozilla.org/docs/Web/JavaScriptneeds triageThis issue needs to be confirmedThis issue needs to be confirmed
Description
What type of issue is this?
Incorrect support data (example: BrowserX says "86" but support was added in "40")
What information was incorrect, unhelpful, or incomplete?
Node.js is reported as not supporting the using
statement.
What browsers does this problem apply to, if applicable?
Node.js
What did you expect to see?
Node.js supports the using statement since version 24.0.0
Did you test this? If so, how?
// test.mjs
class Test {
[Symbol.dispose]() {
console.log("this is disposed");
}
}
function main() {
using test = new Test();
}
main();
$ node test.mjs
this is disposed
Can you link to any release notes, bugs, pull requests, or MDN pages related to this?
- https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V24.md#v8-136
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/using#examples
Do you have anything more you want to share?
Async disposal is also supported
class Test {
[Symbol.asyncDispose]() {
console.log("this is disposed");
}
}
async function main() {
await using test = new Test();
}
await main();
MDN URL
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/using
MDN metadata
MDN page report details
- Query:
javascript.statements.using
- Report started: 2025-08-05T15:48:24.404Z
Metadata
Metadata
Assignees
Labels
data:jsCompat data for JS/ECMAScript features. https://developer.mozilla.org/docs/Web/JavaScriptCompat data for JS/ECMAScript features. https://developer.mozilla.org/docs/Web/JavaScriptneeds triageThis issue needs to be confirmedThis issue needs to be confirmed