diff options
author | Anna Henningsen <anna@addaleax.net> | 2020-10-04 14:11:36 +0300 |
---|---|---|
committer | Node.js GitHub Bot <github-bot@iojs.org> | 2020-10-11 17:35:17 +0300 |
commit | eee522ac29864a55a8bc6686e6b38e93270aa1ca (patch) | |
tree | 3e7ac32cf16d758f1f7480fcb7ef47070c005391 /doc/api/globals.md | |
parent | 705d888387f7a58c10711acbe5a4661c496969ad (diff) |
lib: add EventTarget-related browser globals
Add
- Event
- EventTarget
- MessagePort
- MessageChannel
- MessageEvent
to the set of global objects, since they are available now and behave
like they do in the browser.
Fixes: https://github.com/nodejs/node/issues/35495
PR-URL: https://github.com/nodejs/node/pull/35496
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
Diffstat (limited to 'doc/api/globals.md')
-rw-r--r-- | doc/api/globals.md | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/doc/api/globals.md b/doc/api/globals.md index 8b279a21715..4191c1e017a 100644 --- a/doc/api/globals.md +++ b/doc/api/globals.md @@ -169,6 +169,30 @@ added: v0.1.100 Used to print to stdout and stderr. See the [`console`][] section. +## `Event` +<!-- YAML +added: REPLACEME +--> + +<!-- type=global --> + +> Stability: 1 - Experimental + +A browser-compatible implementation of the `Event` class. See +[`EventTarget` and `Event` API][] for more details. + +## `EventTarget` +<!-- YAML +added: REPLACEME +--> + +<!-- type=global --> + +> Stability: 1 - Experimental + +A browser-compatible implementation of the `EventTarget` class. See +[`EventTarget` and `Event` API][] for more details. + ## `exports` This variable may appear to be global but is not. See [`exports`][]. @@ -187,6 +211,33 @@ within the browser `var something` will define a new global variable. In Node.js this is different. The top-level scope is not the global scope; `var something` inside a Node.js module will be local to that module. +## `MessageChannel` +<!-- YAML +added: REPLACEME +--> + +<!-- type=global --> + +The `MessageChannel` class. See [`MessageChannel`][] for more details. + +## `MessageEvent` +<!-- YAML +added: REPLACEME +--> + +<!-- type=global --> + +The `MessageEvent` class. See [`MessageEvent`][] for more details. + +## `MessagePort` +<!-- YAML +added: REPLACEME +--> + +<!-- type=global --> + +The `MessagePort` class. See [`MessagePort`][] for more details. + ## `module` This variable may appear to be global but is not. See [`module`][]. @@ -322,6 +373,10 @@ The object that acts as the namespace for all W3C [Mozilla Developer Network][webassembly-mdn] for usage and compatibility. [`AbortController`]: https://developer.mozilla.org/en-US/docs/Web/API/AbortController +[`EventTarget` and `Event` API]: events.md#event-target-and-event-api +[`MessageChannel`]: worker_threads.md#worker_threads_class_messagechannel +[`MessageEvent`]: https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/MessageEvent +[`MessagePort`]: worker_threads.md#worker_threads_class_messageport [`TextDecoder`]: util.md#util_class_util_textdecoder [`TextEncoder`]: util.md#util_class_util_textencoder [`URLSearchParams`]: url.md#url_class_urlsearchparams |