From 0c6cc6ec8d6e75c019adf75cb4b27c0d78e71dc5 Mon Sep 17 00:00:00 2001 From: Daeyeon Jeong Date: Mon, 18 Jul 2022 14:24:33 +0900 Subject: [PATCH 1/3] events: expose CustomEvent on global with CLI flag Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com --- doc/api/cli.md | 10 ++++++++++ doc/api/globals.md | 15 +++++++++++++++ doc/node.1 | 3 +++ lib/.eslintrc.yaml | 2 ++ lib/internal/bootstrap/pre_execution.js | 13 +++++++++++++ lib/internal/main/worker_thread.js | 2 ++ src/node_options.cc | 4 ++++ src/node_options.h | 1 + test/common/index.js | 3 +++ test/parallel/test-global-customevent.js | 16 ++++++++++++++++ 10 files changed, 69 insertions(+) create mode 100644 test/parallel/test-global-customevent.js diff --git a/doc/api/cli.md b/doc/api/cli.md index a2861024659af2..f0a2e70b8d7b66 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -280,6 +280,14 @@ effort to report stack traces relative to the original source file. Overriding `Error.prepareStackTrace` prevents `--enable-source-maps` from modifying the stack trace. +### `--experimental-global-customevent` + + + +Expose the [CustomEvent Web API][] on the global scope. + ### `--experimental-global-webcrypto` + +> Stability: 1 - Experimental. Enable this API with the +> [`--experimental-global-customevent`][] CLI flag. + + + +A browser-compatible implementation of the [`CustomEvent` Web API][]. + ## Class: `DecompressionStream`