[][src]Trait stdweb::web::event::IEvent

pub trait IEvent: ReferenceType {
    fn bubbles(&self) -> bool { ... }
fn cancel_bubble(&self) -> bool { ... }
fn set_cancel_bubble(&self, value: bool) { ... }
fn cancelable(&self) -> bool { ... }
fn current_target(&self) -> Option<EventTarget> { ... }
fn default_prevented(&self) -> bool { ... }
fn event_phase(&self) -> EventPhase { ... }
fn stop_immediate_propagation(&self) { ... }
fn stop_propagation(&self) { ... }
fn target(&self) -> Option<EventTarget> { ... }
fn time_stamp(&self) -> Option<f64> { ... }
fn is_trusted(&self) -> bool { ... }
fn event_type(&self) -> String { ... }
fn prevent_default(&self) { ... } }

The IEvent interface represents any event which takes place in the DOM; some are user-generated (such as mouse or keyboard events), while others are generated by APIs (such as events that indicate an animation has finished running, a video has been paused, and so forth). There are many types of event, some of which use other interfaces based on the main IEvent interface. IEvent itself contains the properties and methods which are common to all events.

(JavaScript docs)

Provided methods

fn bubbles(&self) -> bool

Indicates whether this event bubbles upward through the DOM.

(JavaScript docs)

fn cancel_bubble(&self) -> bool

A historical alias to Event.stopPropagation().

(JavaScript docs)

fn set_cancel_bubble(&self, value: bool)

A historical alias to Event.stopPropagation(). Setting this to true before returning from an event handler will stop propagation of the event.

(JavaScript docs)

fn cancelable(&self) -> bool

Indicates whether the event is cancelable.

(JavaScript docs)

fn current_target(&self) -> Option<EventTarget>

A reference to the currently registered target of this event.

(JavaScript docs)

fn default_prevented(&self) -> bool

Indicates whether preventDefault has been called on this event.

(JavaScript docs)

fn event_phase(&self) -> EventPhase

Indicates which phase of event flow is currently being evaluated.

(JavaScript docs)

fn stop_immediate_propagation(&self)

Prevents any further listeners from being called for this event.

(JavaScript docs)

fn stop_propagation(&self)

Stops the propagation of this event to descendants in the DOM.

(JavaScript docs)

fn target(&self) -> Option<EventTarget>

Returns a reference to the target to which this event was originally registered.

(JavaScript docs)

fn time_stamp(&self) -> Option<f64>

Returns the time in milliseconds at which this event was created.

(JavaScript docs)

fn is_trusted(&self) -> bool

Indicates whether the event was generated by a user action.

fn event_type(&self) -> String

Returns a string containing the type of event. It is set when the event is constructed and is the name commonly used to refer to the specific event.

(JavaScript docs)

fn prevent_default(&self)

Cancels the event if it is cancelable, without stopping further propagation of the event.

(JavaScript docs)

Loading content...

Implementors

impl IEvent for AuxClickEvent[src]

impl IEvent for BeforeUnloadEvent[src]

impl IEvent for BlurEvent[src]

impl IEvent for ChangeEvent[src]

impl IEvent for ClickEvent[src]

impl IEvent for ContextMenuEvent[src]

impl IEvent for DoubleClickEvent[src]

impl IEvent for DragDropEvent[src]

impl IEvent for DragEndEvent[src]

impl IEvent for DragEnterEvent[src]

impl IEvent for DragEvent[src]

impl IEvent for DragExitEvent[src]

impl IEvent for DragLeaveEvent[src]

impl IEvent for DragOverEvent[src]

impl IEvent for DragRelatedEvent[src]

impl IEvent for DragStartEvent[src]

impl IEvent for FocusEvent[src]

impl IEvent for FullscreenChangeEvent[src]

impl IEvent for GamepadConnectedEvent[src]

impl IEvent for GamepadDisconnectedEvent[src]

impl IEvent for GotPointerCaptureEvent[src]

impl IEvent for HashChangeEvent[src]

impl IEvent for InputEvent[src]

impl IEvent for KeyDownEvent[src]

impl IEvent for KeyPressEvent[src]

impl IEvent for KeyUpEvent[src]

impl IEvent for LoadEndEvent[src]

impl IEvent for LoadStartEvent[src]

impl IEvent for LostPointerCaptureEvent[src]

impl IEvent for MouseDownEvent[src]

impl IEvent for MouseEnterEvent[src]

impl IEvent for MouseLeaveEvent[src]

impl IEvent for MouseMoveEvent[src]

impl IEvent for MouseOutEvent[src]

impl IEvent for MouseOverEvent[src]

impl IEvent for MouseUpEvent[src]

impl IEvent for MouseWheelEvent[src]

impl IEvent for PointerCancelEvent[src]

impl IEvent for PointerDownEvent[src]

impl IEvent for PointerEnterEvent[src]

impl IEvent for PointerLeaveEvent[src]

impl IEvent for PointerLockChangeEvent[src]

impl IEvent for PointerLockErrorEvent[src]

impl IEvent for PointerMoveEvent[src]

impl IEvent for PointerOutEvent[src]

impl IEvent for PointerOverEvent[src]

impl IEvent for PointerUpEvent[src]

impl IEvent for PopStateEvent[src]

impl IEvent for ProgressAbortEvent[src]

impl IEvent for ProgressErrorEvent[src]

impl IEvent for ProgressEvent[src]

impl IEvent for ProgressLoadEvent[src]

impl IEvent for ReadyStateChangeEvent[src]

impl IEvent for ResizeEvent[src]

impl IEvent for ResourceAbortEvent[src]

impl IEvent for ResourceErrorEvent[src]

impl IEvent for ResourceLoadEvent[src]

impl IEvent for ScrollEvent[src]

impl IEvent for SelectionChangeEvent[src]

impl IEvent for SlotChangeEvent[src]

impl IEvent for SocketCloseEvent[src]

impl IEvent for SocketErrorEvent[src]

impl IEvent for SocketMessageEvent[src]

impl IEvent for SocketOpenEvent[src]

impl IEvent for SubmitEvent[src]

impl IEvent for TouchCancel[src]

impl IEvent for TouchEnd[src]

impl IEvent for TouchEnter[src]

impl IEvent for TouchEvent[src]

impl IEvent for TouchLeave[src]

impl IEvent for TouchMove[src]

impl IEvent for TouchStart[src]

impl IEvent for UnloadEvent[src]

Loading content...