From 1ec14c2c61dc187ed84d4b075621f2054620620f Mon Sep 17 00:00:00 2001 From: Deokjin Kim Date: Sat, 7 Jan 2023 16:56:34 +0900 Subject: [PATCH] doc: fix `event.cancelBubble` documentation Setter of `event.cancelBubble` is a no-op if the value passed to it is not `true`. Refs: https://dom.spec.whatwg.org/#interface-event PR-URL: https://github.com/nodejs/node/pull/45986 Reviewed-By: Antoine du Hamel Reviewed-By: Anna Henningsen --- doc/api/events.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/api/events.md b/doc/api/events.md index 68ad79e7a62d41..ac9f965c771652 100644 --- a/doc/api/events.md +++ b/doc/api/events.md @@ -1748,14 +1748,16 @@ added: v14.5.0 This is not used in Node.js and is provided purely for completeness. -#### `event.cancelBubble()` +#### `event.cancelBubble` -Alias for `event.stopPropagation()`. This is not used in Node.js and is -provided purely for completeness. +* Type: {boolean} + +Alias for `event.stopPropagation()` if set to `true`. This is not used +in Node.js and is provided purely for completeness. #### `event.cancelable`