events: no stopPropagation call in cancelBubble

PR-URL: https://github.com/nodejs/node/pull/50405
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
This commit is contained in:
mert.altin authored and Richard Lau committed 2024-03-25 19:27:48 +00:00
1 parent 6bf148e12b
commit d9b5cd533c
2 files changed
+8 -1

No files matched your search

+1 -1
View File
@@ -310,7 +310,7 @@ class Event {
if (!isEvent(this))
throw new ERR_INVALID_THIS('Event');
if (value) {
this.stopPropagation();
this.#propagationStopped = true;
}
}
+7
View File
@@ -738,3 +738,10 @@ let asyncTest = Promise.resolve();
controller.abort();
et.dispatchEvent(new Event('foo'));
}
{
const event = new Event('foo');
strictEqual(event.cancelBubble, false);
event.cancelBubble = true;
strictEqual(event.cancelBubble, true);
}