pub(crate) type MouseEventInit = MouseEventInit<DomTypeHolder>;
Aliased Type§
struct MouseEventInit {
pub(crate) parent: EventModifierInit<DomTypeHolder>,
pub(crate) button: i16,
pub(crate) buttons: u16,
pub(crate) clientX: i32,
pub(crate) clientY: i32,
pub(crate) relatedTarget: Option<Root<Dom<EventTarget>>>,
pub(crate) screenX: i32,
pub(crate) screenY: i32,
}
Fields§
§parent: EventModifierInit<DomTypeHolder>
§clientX: i32
§clientY: i32
§screenX: i32
§screenY: i32
Implementations
Source§impl<D: DomTypes> MouseEventInit<D>
impl<D: DomTypes> MouseEventInit<D>
pub(crate) unsafe fn to_jsobject( &self, cx: *mut JSContext, obj: MutableHandleObject<'_>, )
Source§impl<D: DomTypes> MouseEventInit<D>
impl<D: DomTypes> MouseEventInit<D>
pub(crate) fn empty() -> Self
pub(crate) fn new( cx: SafeJSContext, val: HandleValue<'_>, ) -> Result<ConversionResult<MouseEventInit<D>>, ()>
Trait Implementations
Source§impl<D: DomTypes> Default for MouseEventInit<D>
impl<D: DomTypes> Default for MouseEventInit<D>
Source§impl<D: DomTypes> FromJSValConvertible for MouseEventInit<D>
impl<D: DomTypes> FromJSValConvertible for MouseEventInit<D>
Source§unsafe fn from_jsval(
cx: *mut JSContext,
value: HandleValue<'_>,
_option: (),
) -> Result<ConversionResult<MouseEventInit<D>>, ()>
unsafe fn from_jsval( cx: *mut JSContext, value: HandleValue<'_>, _option: (), ) -> Result<ConversionResult<MouseEventInit<D>>, ()>
Convert
val
to type Self
.
Optional configuration of type T
can be passed as the option
argument.
If it returns Err(())
, a JSAPI exception is pending.
If it returns Ok(Failure(reason))
, there is no pending JSAPI exception.