From 7fdc27d6015206854fa6c22bf44bb7a143b1838b Mon Sep 17 00:00:00 2001 From: Deokjin Kim Date: Tue, 3 Jan 2023 11:00:56 +0900 Subject: [PATCH 1/5] events: add `initEvent` to Event Refs: https://dom.spec.whatwg.org/#dom-event-initevent --- doc/api/events.md | 15 +++++++++++++++ lib/internal/event_target.js | 18 ++++++++++++++++++ test/wpt/status/dom/events.json | 8 -------- 3 files changed, 33 insertions(+), 8 deletions(-) diff --git a/doc/api/events.md b/doc/api/events.md index 93086ca36807fc..ed0793b27debe7 100644 --- a/doc/api/events.md +++ b/doc/api/events.md @@ -1819,6 +1819,21 @@ added: v14.5.0 This is not used in Node.js and is provided purely for completeness. +#### `event.initEvent(type[, bubbles, cancelable])` + + + +> Stability: 3 - Legacy + +* `type` {string} +* `bubbles` {boolean} +* `cancelable` {boolean} + +Redundant with event constructors and incapable of setting `composed`. +This is not used in Node.js and is provided purely for completeness. + #### `event.isTrusted` -> Stability: 3 - Legacy +> Stability: 3 - Legacy: The WHATWG spec considers it deprecated and users +shouldn't use it at all. * `type` {string} * `bubbles` {boolean} @@ -1833,7 +1834,6 @@ added: REPLACEME Redundant with event constructors and incapable of setting `composed`. This is not used in Node.js and is provided purely for completeness. -The WHATWG spec considers it deprecated and users shouldn't use it at all. #### `event.isTrusted` From c951aeaf6665647a29175255cb89deaa5f60b1a5 Mon Sep 17 00:00:00 2001 From: Deokjin Kim Date: Mon, 16 Jan 2023 19:00:07 +0900 Subject: [PATCH 4/5] fix legacy banner by adding `>` symbol Co-authored-by: Antoine du Hamel --- doc/api/events.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/events.md b/doc/api/events.md index d5d290b451df49..acbcf82050c81e 100644 --- a/doc/api/events.md +++ b/doc/api/events.md @@ -1826,7 +1826,7 @@ added: REPLACEME --> > Stability: 3 - Legacy: The WHATWG spec considers it deprecated and users -shouldn't use it at all. +> shouldn't use it at all. * `type` {string} * `bubbles` {boolean} From 0db45a6eaee4f7c89299d1ef4584a0fb4983b788 Mon Sep 17 00:00:00 2001 From: Deokjin Kim Date: Mon, 16 Jan 2023 19:16:51 +0900 Subject: [PATCH 5/5] fix options by adding nested option Co-authored-by: Antoine du Hamel --- doc/api/events.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/events.md b/doc/api/events.md index acbcf82050c81e..6307dcb3208786 100644 --- a/doc/api/events.md +++ b/doc/api/events.md @@ -1819,7 +1819,7 @@ added: v14.5.0 This is not used in Node.js and is provided purely for completeness. -#### `event.initEvent(type[, bubbles, cancelable])` +#### `event.initEvent(type[, bubbles[, cancelable]])`