Function freya::elements::onpointerover

pub fn onpointerover<E, T>(
    _f: impl FnMut(Event<PointerData>) -> E + 'static
) -> Attribute
where E: EventReturn<T>,
Expand description

The pointerover event fires when the user hovers/touches over an element. Unlike onpointerenter, this fires even if the user was already hovering over the element. For that reason, it’s less efficient.

Event Data: PointerData

§Example

fn app() -> Element {
    rsx!(
        rect {
            width: "100",
            height: "100",
            background: "red",
            onpointerover: |_| println!("Hovering or touching!")
        }
    )
}