pub trait NotificationMethods<D>where
    D: DomTypes,{
Show 28 methods
    // Required methods
    fn GetPermission(
        global: &<D as DomTypes>::GlobalScope,
    ) -> Result<NotificationPermission, Error>;
    fn RequestPermission(
        global: &<D as DomTypes>::GlobalScope,
        deprecatedCallback: Option<Rc<NotificationPermissionCallback<D>>>,
        _can_gc: CanGc,
    ) -> Rc<<D as DomTypes>::Promise>;
    fn MaxActions(global: &<D as DomTypes>::GlobalScope) -> u32;
    fn GetOnclick(&self) -> Option<Rc<EventHandlerNonNull<D>>>;
    fn SetOnclick(&self, value: Option<Rc<EventHandlerNonNull<D>>>);
    fn GetOnshow(&self) -> Option<Rc<EventHandlerNonNull<D>>>;
    fn SetOnshow(&self, value: Option<Rc<EventHandlerNonNull<D>>>);
    fn GetOnerror(&self) -> Option<Rc<EventHandlerNonNull<D>>>;
    fn SetOnerror(&self, value: Option<Rc<EventHandlerNonNull<D>>>);
    fn GetOnclose(&self) -> Option<Rc<EventHandlerNonNull<D>>>;
    fn SetOnclose(&self, value: Option<Rc<EventHandlerNonNull<D>>>);
    fn Title(&self) -> DOMString;
    fn Dir(&self) -> NotificationDirection;
    fn Lang(&self) -> DOMString;
    fn Body(&self) -> DOMString;
    fn Tag(&self) -> DOMString;
    fn Image(&self) -> USVString;
    fn Icon(&self) -> USVString;
    fn Badge(&self) -> USVString;
    fn Renotify(&self) -> bool;
    fn RequireInteraction(&self) -> bool;
    fn GetSilent(&self) -> Option<bool>;
    fn Vibrate(
        &self,
        cx: JSContext,
        _can_gc: CanGc,
        retval: MutableHandle<'_, Value>,
    );
    fn Timestamp(&self) -> u64;
    fn Data(&self, cx: JSContext, retval: MutableHandle<'_, Value>);
    fn Actions(
        &self,
        cx: JSContext,
        _can_gc: CanGc,
        retval: MutableHandle<'_, Value>,
    );
    fn Close(&self);
    fn Constructor(
        global: &<D as DomTypes>::GlobalScope,
        proto: Option<Handle<'_, *mut JSObject>>,
        can_gc: CanGc,
        title: DOMString,
        options: RootedTraceableBox<NotificationOptions>,
    ) -> Result<Root<Dom<<D as DomTypes>::Notification>>, Error>;
}Required Methods§
fn GetPermission( global: &<D as DomTypes>::GlobalScope, ) -> Result<NotificationPermission, Error>
fn RequestPermission( global: &<D as DomTypes>::GlobalScope, deprecatedCallback: Option<Rc<NotificationPermissionCallback<D>>>, _can_gc: CanGc, ) -> Rc<<D as DomTypes>::Promise>
fn MaxActions(global: &<D as DomTypes>::GlobalScope) -> u32
fn GetOnclick(&self) -> Option<Rc<EventHandlerNonNull<D>>>
fn SetOnclick(&self, value: Option<Rc<EventHandlerNonNull<D>>>)
fn GetOnshow(&self) -> Option<Rc<EventHandlerNonNull<D>>>
fn SetOnshow(&self, value: Option<Rc<EventHandlerNonNull<D>>>)
fn GetOnerror(&self) -> Option<Rc<EventHandlerNonNull<D>>>
fn SetOnerror(&self, value: Option<Rc<EventHandlerNonNull<D>>>)
fn GetOnclose(&self) -> Option<Rc<EventHandlerNonNull<D>>>
fn SetOnclose(&self, value: Option<Rc<EventHandlerNonNull<D>>>)
fn Title(&self) -> DOMString
fn Dir(&self) -> NotificationDirection
fn Lang(&self) -> DOMString
fn Body(&self) -> DOMString
fn Tag(&self) -> DOMString
fn Image(&self) -> USVString
fn Icon(&self) -> USVString
fn Badge(&self) -> USVString
fn Renotify(&self) -> bool
fn RequireInteraction(&self) -> bool
fn GetSilent(&self) -> Option<bool>
fn Vibrate( &self, cx: JSContext, _can_gc: CanGc, retval: MutableHandle<'_, Value>, )
fn Timestamp(&self) -> u64
fn Data(&self, cx: JSContext, retval: MutableHandle<'_, Value>)
fn Actions( &self, cx: JSContext, _can_gc: CanGc, retval: MutableHandle<'_, Value>, )
fn Close(&self)
fn Constructor( global: &<D as DomTypes>::GlobalScope, proto: Option<Handle<'_, *mut JSObject>>, can_gc: CanGc, title: DOMString, options: RootedTraceableBox<NotificationOptions>, ) -> Result<Root<Dom<<D as DomTypes>::Notification>>, Error>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.