Trait script::dom::bindings::codegen::Bindings::KeyboardEventBinding::KeyboardEvent_Binding::KeyboardEventMethods
source · pub trait KeyboardEventMethods<D: DomTypes> {
Show 16 methods
// Required methods
fn Key(&self) -> DOMString;
fn Code(&self) -> DOMString;
fn Location(&self) -> u32;
fn CtrlKey(&self) -> bool;
fn ShiftKey(&self) -> bool;
fn AltKey(&self) -> bool;
fn MetaKey(&self) -> bool;
fn Repeat(&self) -> bool;
fn IsComposing(&self) -> bool;
fn GetModifierState(&self, keyArg: DOMString) -> bool;
fn InitKeyboardEvent(
&self,
typeArg: DOMString,
bubblesArg: bool,
cancelableArg: bool,
viewArg: Option<&Window>,
keyArg: DOMString,
locationArg: u32,
modifiersListArg: DOMString,
repeat: bool,
locale: DOMString,
);
fn CharCode(&self) -> u32;
fn KeyCode(&self) -> u32;
fn Which(&self) -> u32;
fn IsTrusted(&self) -> bool;
fn Constructor(
global: &Window,
proto: Option<HandleObject<'_>>,
can_gc: CanGc,
typeArg: DOMString,
keyboardEventInitDict: &KeyboardEventInit,
) -> Result<Root<Dom<KeyboardEvent>>, Error>;
}
Required Methods§
fn Key(&self) -> DOMString
fn Code(&self) -> DOMString
fn Location(&self) -> u32
fn CtrlKey(&self) -> bool
fn ShiftKey(&self) -> bool
fn AltKey(&self) -> bool
fn MetaKey(&self) -> bool
fn Repeat(&self) -> bool
fn IsComposing(&self) -> bool
fn GetModifierState(&self, keyArg: DOMString) -> bool
fn InitKeyboardEvent( &self, typeArg: DOMString, bubblesArg: bool, cancelableArg: bool, viewArg: Option<&Window>, keyArg: DOMString, locationArg: u32, modifiersListArg: DOMString, repeat: bool, locale: DOMString, )
fn CharCode(&self) -> u32
fn KeyCode(&self) -> u32
fn Which(&self) -> u32
fn IsTrusted(&self) -> bool
fn Constructor( global: &Window, proto: Option<HandleObject<'_>>, can_gc: CanGc, typeArg: DOMString, keyboardEventInitDict: &KeyboardEventInit, ) -> Result<Root<Dom<KeyboardEvent>>, Error>
Object Safety§
This trait is not object safe.