Function freya_testing::elements::events::onpointerleave
source · pub fn onpointerleave<'a>(
_cx: &'a ScopeState,
_f: impl FnMut(Event<PointerData>) + 'a
) -> Attribute<'a>
Expand description
The pointerleave
event will fire when the user stops hovering/touching an element.
Event Data: PointerData
Example:
fn app(cx: Scope) -> Element {
render!(
rect {
width: "100",
height: "100",
background: "red",
onpointerleave: |_| println!("Started hovering or touching!")
}
)
}