pub struct InputEvent {
pub event: Event,
pub input_type: String,
pub data: Option<String>,
pub data_transfer: Option<Rc<DataTransfer>>,
pub is_composing: bool,
}Expand description
A DOM InputEvent: a beforeinput or input.
Fields§
§event: Event§input_type: StringinputType ("insertText", "deleteContentBackward"…).
data: Option<String>§data_transfer: Option<Rc<DataTransfer>>§is_composing: boolImplementations§
Methods from Deref<Target = Event>§
Sourcepub fn prevent_default(&self)
pub fn prevent_default(&self)
preventDefault(): a cancelable event’s default action is not to
happen.
Sourcepub fn default_prevented(&self) -> bool
pub fn default_prevented(&self) -> bool
defaultPrevented.
Sourcepub fn stop_propagation(&self)
pub fn stop_propagation(&self)
stopPropagation().
Sourcepub fn propagation_stopped(&self) -> bool
pub fn propagation_stopped(&self) -> bool
Whether stopPropagation() was called.
Trait Implementations§
Source§impl Debug for InputEvent
impl Debug for InputEvent
Auto Trait Implementations§
impl !Freeze for InputEvent
impl !RefUnwindSafe for InputEvent
impl !Send for InputEvent
impl !Sync for InputEvent
impl !UnwindSafe for InputEvent
impl Forget for InputEvent
impl Move for InputEvent
impl Unpin for InputEvent
impl UnsafeUnpin for InputEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more