From f85a8e4c59af295afd3551c7532d604c396c413a Mon Sep 17 00:00:00 2001 From: Deokjin Kim Date: Thu, 19 Jan 2023 17:59:00 +0900 Subject: [PATCH] events: add `initEvent` to Event Refs: https://dom.spec.whatwg.org/#dom-event-initevent PR-URL: /~https://github.com/nodejs/node/pull/46069 Reviewed-By: Benjamin Gruenbaum Reviewed-By: Robert Nagy Reviewed-By: Matteo Collina Reviewed-By: Zeyu "Alex" Yang Reviewed-By: Yagiz Nizipli Reviewed-By: Rafael Gonzaga Reviewed-By: Antoine du Hamel --- doc/api/events.md | 16 ++++++++++++++++ lib/internal/event_target.js | 18 ++++++++++++++++++ test/wpt/status/dom/events.json | 8 -------- 3 files changed, 34 insertions(+), 8 deletions(-) diff --git a/doc/api/events.md b/doc/api/events.md index 1b984bcde7ff69..6656b2b2dae3de 100644 --- a/doc/api/events.md +++ b/doc/api/events.md @@ -2086,6 +2086,22 @@ 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: The WHATWG spec considers it deprecated and users +> shouldn't use it at all. + +* `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`