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