Skip to main content

OnInput

Struct OnInput 

Source
pub struct OnInput { /* private fields */ }
Expand description

Execute when a user writes something in an <input> field.

  • Bubbles: Yes
  • Cancelable: No
  • Event type: Event + InputEvent
  • Supported HTML tags: <input type="color">, <input type="date">, <input type="datetime">, <input type="email">, <input type="month">, <input type="number">, <input type="password">, <input type="range">, <input type="search">, <input type="tel">, <input type="text">, <input type="time">, <input type="url">, <input type="week"> and <textarea>.

Implementations§

Source§

impl OnInput

methods inherit form InputEvent

Source

pub fn is_composing(&self) -> bool

Getter for the isComposing field of this object.

MDN Documentation

Source

pub fn input_type(&self) -> String

Getter for the inputType field of this object.

MDN Documentation

Source

pub fn data(&self) -> Option<String>

Getter for the data field of this object.

MDN Documentation

Source

pub fn data_transfer(&self) -> Option<DataTransfer>

Getter for the dataTransfer field of this object.

MDN Documentation

Source

pub fn get_target_ranges(&self) -> Array

The getTargetRanges() method.

MDN Documentation

Source§

impl OnInput

methods inherit form [UiEvent]

Source

pub fn view(&self) -> Option<Window>

Getter for the view field of this object.

MDN Documentation

Source

pub fn detail(&self) -> i32

Getter for the detail field of this object.

MDN Documentation

Source

pub fn layer_x(&self) -> i32

Getter for the layerX field of this object.

MDN Documentation

Source

pub fn layer_y(&self) -> i32

Getter for the layerY field of this object.

MDN Documentation

Source

pub fn page_x(&self) -> i32

Getter for the pageX field of this object.

MDN Documentation

Source

pub fn page_y(&self) -> i32

Getter for the pageY field of this object.

MDN Documentation

Source

pub fn which(&self) -> u32

Getter for the which field of this object.

MDN Documentation

Source

pub fn range_parent(&self) -> Option<Node>

Getter for the rangeParent field of this object.

MDN Documentation

Source

pub fn range_offset(&self) -> i32

Getter for the rangeOffset field of this object.

MDN Documentation

Source§

impl OnInput

methods inherit form Event

Source

pub fn type(&self) -> String

Getter for the type field of this object.

MDN Documentation

Source

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

Getter for the target field of this object.

MDN Documentation

Source

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

Getter for the currentTarget field of this object.

MDN Documentation

Source

pub fn event_phase(&self) -> u16

Getter for the eventPhase field of this object.

MDN Documentation

Source

pub fn bubbles(&self) -> bool

Getter for the bubbles field of this object.

MDN Documentation

Source

pub fn cancelable(&self) -> bool

Getter for the cancelable field of this object.

MDN Documentation

Source

pub fn default_prevented(&self) -> bool

Getter for the defaultPrevented field of this object.

MDN Documentation

Source

pub fn composed(&self) -> bool

Getter for the composed field of this object.

MDN Documentation

Source

pub fn is_trusted(&self) -> bool

Getter for the isTrusted field of this object.

MDN Documentation

Source

pub fn time_stamp(&self) -> f64

Getter for the timeStamp field of this object.

MDN Documentation

Source

pub fn cancel_bubble(&self) -> bool

Getter for the cancelBubble field of this object.

MDN Documentation

Source

pub fn set_cancel_bubble(&self, value: bool)

Setter for the cancelBubble field of this object.

MDN Documentation

Source

pub fn composed_path(&self) -> Array

The composedPath() method.

MDN Documentation

Source

pub fn prevent_default(&self)

The preventDefault() method.

MDN Documentation

Source

pub fn stop_immediate_propagation(&self)

The stopImmediatePropagation() method.

MDN Documentation

Source

pub fn stop_propagation(&self)

The stopPropagation() method.

MDN Documentation

Trait Implementations§

Source§

impl Clone for OnInput

Source§

fn clone(&self) -> OnInput

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for OnInput

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for OnInput

Source§

impl From<Event> for OnInput

Source§

fn from(e: Event) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for OnInput

Source§

fn eq(&self, other: &OnInput) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for OnInput

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<S, T> Upcast<T> for S
where T: UpcastFrom<S> + ?Sized, S: ?Sized,

Source§

fn upcast(&self) -> &T
where Self: ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider ref type within the Wasm bindgen generics type system. Read more
Source§

fn upcast_into(self) -> T
where Self: Sized + ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider type within the Wasm bindgen generics type system. Read more