[whatwg/webidl] Add disposer and async_disposer (PR #1488)

An intial draft at adding the `disposer` and `async_disposer` keywords to declare that an interface implements `Symbol.dispose` and `Symbol.asyncDispose`:

```
interface Foo {
  disposer;
  async_disposer;
}
```

```js
using foo = new Foo();
await using foo = new Foo();
```

- [ ] At least two implementers are interested (and none opposed):
   * Node.js
   * Cloudflare Workers
   * ...
- [ ] [Tests](https://github.com/web-platform-tests/wpt) are written and can be reviewed and commented upon at:
   * … <!-- If these tests are tentative, link a PR to make them non-tentative. -->
- [ ] [Implementation bugs](https://github.com/whatwg/meta/blob/main/MAINTAINERS.md#handling-pull-requests) are filed:
   * Chromium: …
   * Gecko: …
   * WebKit: …
   * Deno: …
   * Node.js: …
   * webidl2.js: …
   * widlparser: …
- [ ] [MDN issue](https://github.com/whatwg/meta/blob/main/MAINTAINERS.md#handling-pull-requests) is filed: …
- [ ] The top of this comment includes a [clear commit message](https://github.com/whatwg/meta/blob/main/COMMITTING.md) to use. <!-- If you created this PR from a single commit, Github copied its message. Otherwise, you need to add a commit message yourself. -->

(See [WHATWG Working Mode: Changes](https://whatwg.org/working-mode#changes) for more details.)


<!--
    This comment and the below content is programmatically generated.
    You may add a comma-separated list of anchors you'd like a
    direct link to below (e.g. #idl-serializers, #idl-sequence):

    Don't remove this comment or modify anything below this line.
    If you don't want a preview generated for this pull request,
    just replace the whole of this comment's content by "no preview"
    and remove what's below.
-->
***
<a href="https://whatpr.org/webidl/1488.html" title="Last updated on May 19, 2025, 9:28 PM UTC (afba088)">Preview</a> | <a href="https://whatpr.org/webidl/1488/122e9da...afba088.html" title="Last updated on May 19, 2025, 9:28 PM UTC (afba088)">Diff</a>
You can view, comment on, or merge this pull request online at:

  https://github.com/whatwg/webidl/pull/1488

-- Commit Summary --

  * Add disposer and async_disposer

-- File Changes --

    M index.bs (154)

-- Patch Links --

https://github.com/whatwg/webidl/pull/1488.patch
https://github.com/whatwg/webidl/pull/1488.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/webidl/pull/1488
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/webidl/pull/1488@github.com>

Received on Monday, 19 May 2025 21:29:13 UTC