redraw/event

Types

Synthetic Event sent by React. It conforms to the same standard as the underlying DOM events, but fixes some browser inconsistencies.

Documentation

pub type Event

Functions

pub fn bubbles(event: Event) -> Bool

Returns whether the event bubbles through the DOM.

pub fn cancelable(event: Event) -> Bool

Returns whether the event can be canceled.

pub fn current_target(event: Event) -> Dynamic

Returns the node to which the current handler is attached in the React tree.

pub fn default_prevented(event: Event) -> Bool

Returns whether prevent_default was called.

pub fn event_phase(event: Event) -> Int

Returns which phase the event is currently in.

pub fn is_default_prevented(event: Event) -> Bool

Returns a boolean value indicating whether prevent_default was called.

pub fn is_persistent(event: Event) -> Bool

Not used with React DOM. With React Native, returns whether persist has been called.

pub fn is_propagation_stopped(event: Event) -> Bool

Returns a boolean value indicating whether stop_propagation was called.

pub fn is_trusted(event: Event) -> Bool

Returns whether the event was initiated by user.

pub fn native_event(event: Event) -> Dynamic

The original browser event object.

pub fn persist(event: Event) -> Event

Not used with React DOM. With React Native, call this to read event’s properties after the event.

pub fn prevent_default(event: Event) -> Event

Prevents the default browser action for the event.

pub fn stop_propagation(event: Event) -> Event

Stops the event propagation through the React tree.

pub fn target(event: Event) -> Dynamic

Returns the node on which the event has occurred (which could be a distant child).

pub fn time_stamp(event: Event) -> Int

Returns the time when the event occurred.

Search Document