From ffda9a8953ccf5afe099322d038eb23f2cfe6d82 Mon Sep 17 00:00:00 2001 From: Rohan Sharma Date: Wed, 23 Jun 2021 20:14:56 +0530 Subject: [PATCH] doc: fix `EventTarget.dispatchEvent` docs PR-URL: https://github.com/nodejs/node/pull/39127 Reviewed-By: Antoine du Hamel Reviewed-By: Benjamin Gruenbaum Reviewed-By: Luigi Pinca --- doc/api/events.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/api/events.md b/doc/api/events.md index 540b663bd56968..06556759188e57 100644 --- a/doc/api/events.md +++ b/doc/api/events.md @@ -1485,11 +1485,11 @@ target.removeEventListener('foo', handler, { capture: true }); added: v14.5.0 --> -* `event` {Object|Event} +* `event` {Event} +* Returns: {boolean} `true` if either event’s `cancelable` attribute value is + false or its `preventDefault()` method was not invoked, otherwise `false`. -Dispatches the `event` to the list of handlers for `event.type`. The `event` -may be an `Event` object or any object with a `type` property whose value is -a `string`. +Dispatches the `event` to the list of handlers for `event.type`. The registered event listeners is synchronously invoked in the order they were registered.