events: graduate Event, EventTarget, AbortController

Graduate these from experimental status

Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/35949
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
This commit is contained in:
James M Snell committed 2020-11-23 09:33:41 -08:00
1 parent f5d2374385
commit 513764b580
4 files changed
+16 -11

No files matched your search

+1 -1
View File
@@ -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`
+3 -2
View File
@@ -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
+12 -6
View File
@@ -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.
@@ -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.
-2
View File
@@ -21,7 +21,6 @@ const {
} = require('internal/event_target');
const {
customInspectSymbol,
emitExperimentalWarning
} = require('internal/util');
const { inspect } = require('internal/util/inspect');
@@ -89,7 +88,6 @@ const kSignal = Symbol('signal');
class AbortController {
constructor() {
this[kSignal] = createAbortSignal();
emitExperimentalWarning('AbortController');
}
get signal() { return this[kSignal]; }