pub struct DeviceOrientationEvent { /* private fields */ }Expand description
The DeviceOrientationEvent class.
DeviceOrientationEvent
Implementations§
Source§impl DeviceOrientationEvent
impl DeviceOrientationEvent
Sourcepub fn alpha(&self) -> f64
pub fn alpha(&self) -> f64
Getter of the alpha attribute.
DeviceOrientationEvent.alpha
Source§impl DeviceOrientationEvent
impl DeviceOrientationEvent
Sourcepub fn beta(&self) -> f64
pub fn beta(&self) -> f64
Getter of the beta attribute.
DeviceOrientationEvent.beta
Source§impl DeviceOrientationEvent
impl DeviceOrientationEvent
Sourcepub fn gamma(&self) -> f64
pub fn gamma(&self) -> f64
Getter of the gamma attribute.
DeviceOrientationEvent.gamma
Source§impl DeviceOrientationEvent
impl DeviceOrientationEvent
Sourcepub fn absolute(&self) -> bool
pub fn absolute(&self) -> bool
Getter of the absolute attribute.
DeviceOrientationEvent.absolute
Source§impl DeviceOrientationEvent
impl DeviceOrientationEvent
Sourcepub fn new(type_: &JsString) -> DeviceOrientationEvent
pub fn new(type_: &JsString) -> DeviceOrientationEvent
The new DeviceOrientationEvent(..) constructor, creating a new DeviceOrientationEvent instance
Source§impl DeviceOrientationEvent
impl DeviceOrientationEvent
Sourcepub fn new_with_event_init_dict(
type_: &JsString,
event_init_dict: &DeviceOrientationEventInit,
) -> DeviceOrientationEvent
pub fn new_with_event_init_dict( type_: &JsString, event_init_dict: &DeviceOrientationEventInit, ) -> DeviceOrientationEvent
The new DeviceOrientationEvent(..) constructor, creating a new DeviceOrientationEvent instance
Source§impl DeviceOrientationEvent
impl DeviceOrientationEvent
Sourcepub fn request_permission() -> Promise<PermissionState>
pub fn request_permission() -> Promise<PermissionState>
The requestPermission method.
DeviceOrientationEvent.requestPermission
Source§impl DeviceOrientationEvent
impl DeviceOrientationEvent
Sourcepub fn request_permission_with_absolute(
absolute: bool,
) -> Promise<PermissionState>
pub fn request_permission_with_absolute( absolute: bool, ) -> Promise<PermissionState>
The requestPermission method.
DeviceOrientationEvent.requestPermission
Methods from Deref<Target = Event>§
Sourcepub fn type_(&self) -> JsString
pub fn type_(&self) -> JsString
Getter of the type attribute.
Event.type
Sourcepub fn target(&self) -> EventTarget
pub fn target(&self) -> EventTarget
Getter of the target attribute.
Event.target
Sourcepub fn src_element(&self) -> EventTarget
pub fn src_element(&self) -> EventTarget
Getter of the srcElement attribute.
Event.srcElement
Sourcepub fn current_target(&self) -> EventTarget
pub fn current_target(&self) -> EventTarget
Getter of the currentTarget attribute.
Event.currentTarget
Sourcepub fn event_phase(&self) -> u16
pub fn event_phase(&self) -> u16
Getter of the eventPhase attribute.
Event.eventPhase
Sourcepub fn cancel_bubble(&self) -> bool
pub fn cancel_bubble(&self) -> bool
Getter of the cancelBubble attribute.
Event.cancelBubble
Sourcepub fn set_cancel_bubble(&mut self, value: bool)
pub fn set_cancel_bubble(&mut self, value: bool)
Setter of the cancelBubble attribute.
Event.cancelBubble
Sourcepub fn bubbles(&self) -> bool
pub fn bubbles(&self) -> bool
Getter of the bubbles attribute.
Event.bubbles
Sourcepub fn cancelable(&self) -> bool
pub fn cancelable(&self) -> bool
Getter of the cancelable attribute.
Event.cancelable
Sourcepub fn return_value(&self) -> bool
pub fn return_value(&self) -> bool
Getter of the returnValue attribute.
Event.returnValue
Sourcepub fn set_return_value(&mut self, value: bool)
pub fn set_return_value(&mut self, value: bool)
Setter of the returnValue attribute.
Event.returnValue
Sourcepub fn default_prevented(&self) -> bool
pub fn default_prevented(&self) -> bool
Getter of the defaultPrevented attribute.
Event.defaultPrevented
Sourcepub fn composed(&self) -> bool
pub fn composed(&self) -> bool
Getter of the composed attribute.
Event.composed
Sourcepub fn is_trusted(&self) -> bool
pub fn is_trusted(&self) -> bool
Getter of the isTrusted attribute.
Event.isTrusted
Sourcepub fn time_stamp(&self) -> Any
pub fn time_stamp(&self) -> Any
Getter of the timeStamp attribute.
Event.timeStamp
Sourcepub fn composed_path(&self) -> TypedArray<EventTarget>
pub fn composed_path(&self) -> TypedArray<EventTarget>
The composedPath method.
Event.composedPath
Sourcepub fn stop_propagation(&self) -> Undefined
pub fn stop_propagation(&self) -> Undefined
The stopPropagation method.
Event.stopPropagation
Sourcepub fn stop_immediate_propagation(&self) -> Undefined
pub fn stop_immediate_propagation(&self) -> Undefined
The stopImmediatePropagation method.
Event.stopImmediatePropagation
Sourcepub fn prevent_default(&self) -> Undefined
pub fn prevent_default(&self) -> Undefined
The preventDefault method.
Event.preventDefault
Sourcepub fn init_event(&self, type_: &JsString) -> Undefined
pub fn init_event(&self, type_: &JsString) -> Undefined
The initEvent method.
Event.initEvent
Sourcepub fn init_event_with_bubbles(
&self,
type_: &JsString,
bubbles: bool,
) -> Undefined
pub fn init_event_with_bubbles( &self, type_: &JsString, bubbles: bool, ) -> Undefined
The initEvent method.
Event.initEvent
Sourcepub fn init_event_with_bubbles_and_cancelable(
&self,
type_: &JsString,
bubbles: bool,
cancelable: bool,
) -> Undefined
pub fn init_event_with_bubbles_and_cancelable( &self, type_: &JsString, bubbles: bool, cancelable: bool, ) -> Undefined
The initEvent method.
Event.initEvent
Methods from Deref<Target = Any>§
Sourcepub fn has_own_property(&self, prop: &str) -> bool
pub fn has_own_property(&self, prop: &str) -> bool
Checks whether a non-inherited property prop exists
Sourcepub fn at<T>(&self, idx: T) -> Val
pub fn at<T>(&self, idx: T) -> Val
Gets the element at index idx. Assumes the underlying js type is indexable
Sourcepub fn to_vec<V>(&self) -> Vec<V>where
V: FromVal,
pub fn to_vec<V>(&self) -> Vec<V>where
V: FromVal,
Converts the underlying js array to a Vec of V
Sourcepub fn call(&self, f: &str, args: &[Val]) -> Val
pub fn call(&self, f: &str, args: &[Val]) -> Val
Calls the method f with args, can return an undefined js value
Sourcepub fn new(&self, args: &[Val]) -> Val
pub fn new(&self, args: &[Val]) -> Val
Calls the object’s constructor with args constructing a new object
Sourcepub fn invoke(&self, args: &[Val]) -> Val
pub fn invoke(&self, args: &[Val]) -> Val
Invokes the function object with args, can return an undefined js value
Sourcepub fn instanceof(&self, v: Val) -> bool
pub fn instanceof(&self, v: Val) -> bool
Checks whether this Val is an instanceof v
pub fn is_number(&self) -> bool
pub fn is_bool(&self) -> bool
pub fn is_string(&self) -> bool
pub fn is_null(&self) -> bool
pub fn is_undefined(&self) -> bool
pub fn is_error(&self) -> bool
pub fn is_function(&self) -> bool
pub fn as_<T>(&self) -> Twhere
T: FromVal,
Trait Implementations§
Source§impl AsMut<Val> for DeviceOrientationEvent
impl AsMut<Val> for DeviceOrientationEvent
Source§impl AsRef<Val> for DeviceOrientationEvent
impl AsRef<Val> for DeviceOrientationEvent
Source§impl Clone for DeviceOrientationEvent
impl Clone for DeviceOrientationEvent
Source§fn clone(&self) -> DeviceOrientationEvent
fn clone(&self) -> DeviceOrientationEvent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DeviceOrientationEvent
impl Debug for DeviceOrientationEvent
Source§impl Deref for DeviceOrientationEvent
impl Deref for DeviceOrientationEvent
Source§impl DerefMut for DeviceOrientationEvent
impl DerefMut for DeviceOrientationEvent
Source§impl DynCast for DeviceOrientationEvent
impl DynCast for DeviceOrientationEvent
Source§fn instanceof(val: &Any) -> bool
fn instanceof(val: &Any) -> bool
val instanceof ThisType.Source§fn unchecked_from_val(v: Any) -> Self
fn unchecked_from_val(v: Any) -> Self
Val into Self.Source§fn unchecked_from_val_ref(v: &Any) -> &Self
fn unchecked_from_val_ref(v: &Any) -> &Self
&Val into &Self.Source§fn unchecked_from_val_mut(v: &mut Any) -> &mut Self
fn unchecked_from_val_mut(v: &mut Any) -> &mut Self
&mut Val into &mut Self.fn has_type<T>(&self) -> boolwhere
T: DynCast,
fn dyn_into<T>(self) -> Result<T, Self>where
T: DynCast,
fn dyn_ref<T>(&self) -> Option<&T>where
T: DynCast,
fn dyn_mut<T>(&mut self) -> Option<&mut T>where
T: DynCast,
fn unchecked_into<T>(self) -> Twhere
T: DynCast,
fn unchecked_ref<T>(&self) -> &Twhere
T: DynCast,
fn unchecked_mut<T>(&mut self) -> &mut Twhere
T: DynCast,
fn is_instance_of<T>(&self) -> boolwhere
T: DynCast,
Source§fn is_type_of(val: &Val) -> bool
fn is_type_of(val: &Val) -> bool
instanceof.