Skip to main content

web_sys/features/
gen_BeforeUnloadEvent.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7    #[wasm_bindgen(
8        extends = "Event",
9        extends = "::js_sys::Object",
10        js_name = "BeforeUnloadEvent",
11        typescript_type = "BeforeUnloadEvent"
12    )]
13    #[derive(Debug, Clone, PartialEq, Eq)]
14    #[doc = "The `BeforeUnloadEvent` class."]
15    #[doc = ""]
16    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BeforeUnloadEvent)"]
17    #[doc = ""]
18    #[doc = "*This API requires the following crate features to be activated: `BeforeUnloadEvent`*"]
19    pub type BeforeUnloadEvent;
20    #[wasm_bindgen(
21        method,
22        getter,
23        js_class = "BeforeUnloadEvent",
24        js_name = "returnValue"
25    )]
26    #[doc = "Getter for the `returnValue` field of this object."]
27    #[doc = ""]
28    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BeforeUnloadEvent/returnValue)"]
29    #[doc = ""]
30    #[doc = "*This API requires the following crate features to be activated: `BeforeUnloadEvent`*"]
31    pub fn return_value(this: &BeforeUnloadEvent) -> ::alloc::string::String;
32    #[wasm_bindgen(
33        method,
34        setter,
35        js_class = "BeforeUnloadEvent",
36        js_name = "returnValue"
37    )]
38    #[doc = "Setter for the `returnValue` field of this object."]
39    #[doc = ""]
40    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BeforeUnloadEvent/returnValue)"]
41    #[doc = ""]
42    #[doc = "*This API requires the following crate features to be activated: `BeforeUnloadEvent`*"]
43    pub fn set_return_value(this: &BeforeUnloadEvent, value: &str);
44}