web_sys/features/
gen_NotificationEvent.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 # [wasm_bindgen (extends = ExtendableEvent , extends = Event , extends = :: js_sys :: Object , js_name = NotificationEvent , typescript_type = "NotificationEvent")]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `NotificationEvent` class."]
10 #[doc = ""]
11 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/NotificationEvent)"]
12 #[doc = ""]
13 #[doc = "*This API requires the following crate features to be activated: `NotificationEvent`*"]
14 pub type NotificationEvent;
15 #[cfg(feature = "Notification")]
16 # [wasm_bindgen (structural , method , getter , js_class = "NotificationEvent" , js_name = notification)]
17 #[doc = "Getter for the `notification` field of this object."]
18 #[doc = ""]
19 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/NotificationEvent/notification)"]
20 #[doc = ""]
21 #[doc = "*This API requires the following crate features to be activated: `Notification`, `NotificationEvent`*"]
22 pub fn notification(this: &NotificationEvent) -> Notification;
23 #[cfg(feature = "NotificationEventInit")]
24 #[wasm_bindgen(catch, constructor, js_class = "NotificationEvent")]
25 #[doc = "The `new NotificationEvent(..)` constructor, creating a new instance of `NotificationEvent`."]
26 #[doc = ""]
27 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/NotificationEvent/NotificationEvent)"]
28 #[doc = ""]
29 #[doc = "*This API requires the following crate features to be activated: `NotificationEvent`, `NotificationEventInit`*"]
30 pub fn new(
31 type_: &str,
32 event_init_dict: &NotificationEventInit,
33 ) -> Result<NotificationEvent, JsValue>;
34}