Files
servo/components/script_bindings/webidls/FocusEvent.webidl
Tim van der Lippe aad08bf2a6 Properly initialize related_target in UI events (#40182)
UI events can specify `relatedTarget` themselves. These were correctly
initialized, but this wasn't the case for the base event they extend.
Therefore, we need to initialize the event `relatedTarget` and only
store this information once.

This fixes several `shadow-dom/` tests, which were using these UI events
to test behavior.

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2025-10-26 11:36:36 +00:00

15 lines
544 B
Plaintext

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
// https://w3c.github.io/uievents/#interface-focusevent
[Exposed=Window]
interface FocusEvent : UIEvent {
[Throws] constructor(DOMString typeArg, optional FocusEventInit focusEventInitDict = {});
readonly attribute EventTarget? relatedTarget;
};
dictionary FocusEventInit : UIEventInit {
EventTarget? relatedTarget = null;
};