Struct web_sys::Notification
source · #[repr(transparent)]pub struct Notification { /* private fields */ }
Expand description
The Notification
object
This API requires the following crate features to be activated: Notification
Implementations§
source§impl Notification
impl Notification
source§impl Notification
impl Notification
sourcepub fn new_with_options(
title: &str,
options: &NotificationOptions
) -> Result<Notification, JsValue>
pub fn new_with_options(
title: &str,
options: &NotificationOptions
) -> Result<Notification, JsValue>
The new Notification(..)
constructor, creating a new instance of Notification
This API requires the following crate features to be activated: Notification
, NotificationOptions
source§impl Notification
impl Notification
source§impl Notification
impl Notification
source§impl Notification
impl Notification
sourcepub fn get_with_filter(
filter: &GetNotificationOptions
) -> Result<Promise, JsValue>
pub fn get_with_filter(
filter: &GetNotificationOptions
) -> Result<Promise, JsValue>
The get()
method
This API requires the following crate features to be activated: GetNotificationOptions
, Notification
source§impl Notification
impl Notification
sourcepub fn request_permission() -> Result<Promise, JsValue>
pub fn request_permission() -> Result<Promise, JsValue>
The requestPermission()
method
This API requires the following crate features to be activated: Notification
source§impl Notification
impl Notification
source§impl Notification
impl Notification
sourcepub fn permission() -> NotificationPermission
pub fn permission() -> NotificationPermission
The permission
getter
This API requires the following crate features to be activated: Notification
, NotificationPermission
source§impl Notification
impl Notification
source§impl Notification
impl Notification
sourcepub fn set_onclick(&self, onclick: Option<&Function>)
pub fn set_onclick(&self, onclick: Option<&Function>)
The onclick
setter
This API requires the following crate features to be activated: Notification
source§impl Notification
impl Notification
source§impl Notification
impl Notification
sourcepub fn set_onshow(&self, onshow: Option<&Function>)
pub fn set_onshow(&self, onshow: Option<&Function>)
The onshow
setter
This API requires the following crate features to be activated: Notification
source§impl Notification
impl Notification
source§impl Notification
impl Notification
sourcepub fn set_onerror(&self, onerror: Option<&Function>)
pub fn set_onerror(&self, onerror: Option<&Function>)
The onerror
setter
This API requires the following crate features to be activated: Notification
source§impl Notification
impl Notification
source§impl Notification
impl Notification
sourcepub fn set_onclose(&self, onclose: Option<&Function>)
pub fn set_onclose(&self, onclose: Option<&Function>)
The onclose
setter
This API requires the following crate features to be activated: Notification
source§impl Notification
impl Notification
source§impl Notification
impl Notification
sourcepub fn dir(&self) -> NotificationDirection
pub fn dir(&self) -> NotificationDirection
The dir
getter
This API requires the following crate features to be activated: Notification
, NotificationDirection
source§impl Notification
impl Notification
source§impl Notification
impl Notification
source§impl Notification
impl Notification
source§impl Notification
impl Notification
source§impl Notification
impl Notification
sourcepub fn require_interaction(&self) -> bool
pub fn require_interaction(&self) -> bool
The requireInteraction
getter
This API requires the following crate features to be activated: Notification
Trait Implementations§
source§impl AsRef<EventTarget> for Notification
impl AsRef<EventTarget> for Notification
source§fn as_ref(&self) -> &EventTarget
fn as_ref(&self) -> &EventTarget
source§impl AsRef<JsValue> for Notification
impl AsRef<JsValue> for Notification
source§impl AsRef<Object> for Notification
impl AsRef<Object> for Notification
source§impl Clone for Notification
impl Clone for Notification
source§fn clone(&self) -> Notification
fn clone(&self) -> Notification
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for Notification
impl Debug for Notification
source§impl From<JsValue> for Notification
impl From<JsValue> for Notification
source§fn from(obj: JsValue) -> Notification
fn from(obj: JsValue) -> Notification
source§impl From<Notification> for EventTarget
impl From<Notification> for EventTarget
source§fn from(obj: Notification) -> EventTarget
fn from(obj: Notification) -> EventTarget
source§impl From<Notification> for JsValue
impl From<Notification> for JsValue
source§fn from(obj: Notification) -> JsValue
fn from(obj: Notification) -> JsValue
source§impl From<Notification> for Object
impl From<Notification> for Object
source§fn from(obj: Notification) -> Object
fn from(obj: Notification) -> Object
source§impl FromWasmAbi for Notification
impl FromWasmAbi for Notification
source§impl<'a> IntoWasmAbi for &'a Notification
impl<'a> IntoWasmAbi for &'a Notification
source§impl IntoWasmAbi for Notification
impl IntoWasmAbi for Notification
source§impl JsCast for Notification
impl JsCast for Notification
source§fn instanceof(val: &JsValue) -> bool
fn instanceof(val: &JsValue) -> bool
instanceof
check to see whether the JsValue
provided is an instance of this type. Read moresource§fn unchecked_from_js(val: JsValue) -> Self
fn unchecked_from_js(val: JsValue) -> Self
source§fn unchecked_from_js_ref(val: &JsValue) -> &Self
fn unchecked_from_js_ref(val: &JsValue) -> &Self
source§fn is_instance_of<T>(&self) -> boolwhere
T: JsCast,
fn is_instance_of<T>(&self) -> boolwhere
T: JsCast,
T
. Read moresource§fn dyn_into<T>(self) -> Result<T, Self>where
T: JsCast,
fn dyn_into<T>(self) -> Result<T, Self>where
T: JsCast,
T
. Read moresource§fn dyn_ref<T>(&self) -> Option<&T>where
T: JsCast,
fn dyn_ref<T>(&self) -> Option<&T>where
T: JsCast,
T
. Read moresource§fn unchecked_into<T>(self) -> Twhere
T: JsCast,
fn unchecked_into<T>(self) -> Twhere
T: JsCast,
source§impl OptionFromWasmAbi for Notification
impl OptionFromWasmAbi for Notification
source§impl<'a> OptionIntoWasmAbi for &'a Notification
impl<'a> OptionIntoWasmAbi for &'a Notification
source§impl OptionIntoWasmAbi for Notification
impl OptionIntoWasmAbi for Notification
source§impl RefFromWasmAbi for Notification
impl RefFromWasmAbi for Notification
§type Abi = <JsValue as RefFromWasmAbi>::Abi
type Abi = <JsValue as RefFromWasmAbi>::Abi
Self
are recovered from.§type Anchor = ManuallyDrop<Notification>
type Anchor = ManuallyDrop<Notification>
Self
for the duration of the
invocation of the function that has an &Self
parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous. Read moreAuto Trait Implementations§
impl RefUnwindSafe for Notification
impl !Send for Notification
impl !Sync for Notification
impl Unpin for Notification
impl UnwindSafe for Notification
Blanket Implementations§
source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
IntoWasmAbi::Abi
source§fn return_abi(self, extra: &mut dyn Stack) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self, extra: &mut dyn Stack) -> <T as ReturnWasmAbi>::Abi
IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
. Read more