Skip to content

Commit

Permalink
events: graduate Event, EventTarget, AbortController
Browse files Browse the repository at this point in the history
Graduate these from experimental status

Signed-off-by: James M Snell <[email protected]>

PR-URL: #35949
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
  • Loading branch information
jasnell authored and danielleadams committed Dec 7, 2020
1 parent 186ad24 commit dc19309
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 11 deletions.
2 changes: 1 addition & 1 deletion doc/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ changes:
description: --experimental-abortcontroller is no longer required.
-->

Experimental `AbortController` and `AbortSignal` support is enabled by default.
`AbortController` and `AbortSignal` support is enabled by default.
Use of this command-line flag is no longer required.

### `--experimental-import-meta-resolve`
Expand Down
5 changes: 3 additions & 2 deletions doc/api/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -1137,14 +1137,15 @@ setMaxListeners(5, target, emitter);
<!-- YAML
added: v14.5.0
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/35949
description: No longer experimental.
- version: v15.0.0
pr-url: https://github.com/nodejs/node/pull/35496
description:
The `EventTarget` and `Event` classes are now available as globals.
-->

> Stability: 1 - Experimental
The `EventTarget` and `Event` objects are a Node.js-specific implementation
of the [`EventTarget` Web API][] that are exposed by some Node.js core APIs.
Neither the `EventTarget` nor `Event` classes are available for end
Expand Down
18 changes: 12 additions & 6 deletions doc/api/globals.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@ accessible.
## Class: `AbortController`
<!--YAML
added: v15.0.0
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/35949
description: No longer experimental.
-->

> Stability: 1 - Experimental
<!-- type=global -->

A utility class used to signal cancelation in selected `Promise`-based APIs.
Expand Down Expand Up @@ -172,24 +174,28 @@ Used to print to stdout and stderr. See the [`console`][] section.
## `Event`
<!-- YAML
added: v15.0.0
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/35949
description: No longer experimental.
-->

<!-- type=global -->

> Stability: 1 - Experimental
A browser-compatible implementation of the `Event` class. See
[`EventTarget` and `Event` API][] for more details.

## `EventTarget`
<!-- YAML
added: v15.0.0
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/35949
description: No longer experimental.
-->

<!-- type=global -->

> Stability: 1 - Experimental
A browser-compatible implementation of the `EventTarget` class. See
[`EventTarget` and `Event` API][] for more details.

Expand Down
2 changes: 0 additions & 2 deletions lib/internal/abort_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ const {
} = require('internal/event_target');
const {
customInspectSymbol,
emitExperimentalWarning
} = require('internal/util');
const { inspect } = require('internal/util/inspect');

Expand Down Expand Up @@ -89,7 +88,6 @@ const kSignal = Symbol('signal');
class AbortController {
constructor() {
this[kSignal] = createAbortSignal();
emitExperimentalWarning('AbortController');
}

get signal() { return this[kSignal]; }
Expand Down

0 comments on commit dc19309

Please sign in to comment.