mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibWeb: Correctly implement event listeners default passive attribute
This commit implements the default value of the passive attribute of event listeners according to the spec.
This commit is contained in:
committed by
Tim Ledbetter
parent
4c7cd05078
commit
08589741f5
Notes:
github-actions[bot]
2024-12-25 14:58:22 +00:00
Author: https://github.com/skyz1 Commit: https://github.com/LadybirdBrowser/ladybird/commit/08589741f58 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3035 Reviewed-by: https://github.com/konradekk Reviewed-by: https://github.com/tcl3 ✅
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2020-2022, Andreas Kling <andreas@ladybird.org>
|
||||
* Copyright (c) 2024, Glenn Skrzypczak <glenn.skrzypczak@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
@@ -81,7 +82,7 @@ bool EventDispatcher::inner_invoke(Event& event, Vector<GC::Root<DOM::DOMEventLi
|
||||
}
|
||||
|
||||
// 9. If listener’s passive is true, then set event’s in passive listener flag.
|
||||
if (listener->passive)
|
||||
if (listener->passive == true)
|
||||
event.set_in_passive_listener(true);
|
||||
|
||||
// FIXME: 10. If global is a Window object, then record timing info for event listener given event and listener.
|
||||
|
||||
Reference in New Issue
Block a user