Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
use cancelable to determine returnValue
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
  • Loading branch information
deokjinkim and aduh95 authored Jan 17, 2023
commit 4add9b3872d49944eb4ac03a3d0d8ffade20e8f2
2 changes: 1 addition & 1 deletion lib/internal/event_target.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ class Event {
get returnValue() {
if (!isEvent(this))
throw new ERR_INVALID_THIS('Event');
return !this.#defaultPrevented;
return !this.#cancelable || !this.#defaultPrevented;
}

/**
Expand Down