Files
servo/components/script_bindings/webidls/ToggleEvent.webidl
Luke Warlow 8ca4ecba02 script: Implement ToggleEvent and use for <details> element (#40271)
Implement ToggleEvent and use for details element

Testing: Covered by existing WPTs

Signed-off-by: Luke Warlow <lwarlow@igalia.com>
2025-11-02 18:20:18 +00:00

19 lines
658 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://html.spec.whatwg.org/multipage/#the-toggleevent-interface
[Exposed=Window]
interface ToggleEvent : Event {
[Throws] constructor(DOMString type, optional ToggleEventInit eventInitDict = {});
readonly attribute DOMString oldState;
readonly attribute DOMString newState;
readonly attribute Element? source;
};
dictionary ToggleEventInit : EventInit {
DOMString oldState = "";
DOMString newState = "";
Element? source = null;
};