-
-
Notifications
You must be signed in to change notification settings - Fork 796
Description
Heya, currently on:toggle
only provides an Event
, whereas web_sys
supported ToggleEvent
(MDN) since 0.2.93
(search for "Popover API", wasm-bindgen/wasm-bindgen#3977 -- gen_ToggleEvent.rs
got added here).
Describe the solution you'd like
I'd like to have a ToggleEvent
so that the new_state
method can be called, so I can set a signal on a bool
.
I'm using this on a <details>
element, and based on the open
state, I change the <summary>
text.
Describe alternatives you've considered
Using an <input>
element's checked
state, and styling sibling elements as expanded or collapsed. But I'd rather use a built-in expandable element.
Additional context
I've tested my project with this code and it works: #4362
It is a breaking change if there is code that explicitly uses |event: Event|
as the parameter, but I think it's source compatible if they used an inferred type parameter and don't pass it somewhere else that is strict on the type.