Skip to main content

web_sys/features/
gen_StorageEvent.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 = "StorageEvent",
11        typescript_type = "StorageEvent"
12    )]
13    #[derive(Debug, Clone, PartialEq, Eq)]
14    #[doc = "The `StorageEvent` class."]
15    #[doc = ""]
16    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/StorageEvent)"]
17    #[doc = ""]
18    #[doc = "*This API requires the following crate features to be activated: `StorageEvent`*"]
19    pub type StorageEvent;
20    #[wasm_bindgen(method, getter, js_class = "StorageEvent", js_name = "key")]
21    #[doc = "Getter for the `key` field of this object."]
22    #[doc = ""]
23    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/StorageEvent/key)"]
24    #[doc = ""]
25    #[doc = "*This API requires the following crate features to be activated: `StorageEvent`*"]
26    pub fn key(this: &StorageEvent) -> Option<::alloc::string::String>;
27    #[wasm_bindgen(method, getter, js_class = "StorageEvent", js_name = "oldValue")]
28    #[doc = "Getter for the `oldValue` field of this object."]
29    #[doc = ""]
30    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/StorageEvent/oldValue)"]
31    #[doc = ""]
32    #[doc = "*This API requires the following crate features to be activated: `StorageEvent`*"]
33    pub fn old_value(this: &StorageEvent) -> Option<::alloc::string::String>;
34    #[wasm_bindgen(method, getter, js_class = "StorageEvent", js_name = "newValue")]
35    #[doc = "Getter for the `newValue` field of this object."]
36    #[doc = ""]
37    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/StorageEvent/newValue)"]
38    #[doc = ""]
39    #[doc = "*This API requires the following crate features to be activated: `StorageEvent`*"]
40    pub fn new_value(this: &StorageEvent) -> Option<::alloc::string::String>;
41    #[wasm_bindgen(method, getter, js_class = "StorageEvent", js_name = "url")]
42    #[doc = "Getter for the `url` field of this object."]
43    #[doc = ""]
44    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/StorageEvent/url)"]
45    #[doc = ""]
46    #[doc = "*This API requires the following crate features to be activated: `StorageEvent`*"]
47    pub fn url(this: &StorageEvent) -> Option<::alloc::string::String>;
48    #[cfg(feature = "Storage")]
49    #[wasm_bindgen(method, getter, js_class = "StorageEvent", js_name = "storageArea")]
50    #[doc = "Getter for the `storageArea` field of this object."]
51    #[doc = ""]
52    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/StorageEvent/storageArea)"]
53    #[doc = ""]
54    #[doc = "*This API requires the following crate features to be activated: `Storage`, `StorageEvent`*"]
55    pub fn storage_area(this: &StorageEvent) -> Option<Storage>;
56    #[wasm_bindgen(catch, constructor, js_class = "StorageEvent")]
57    #[doc = "The `new StorageEvent(..)` constructor, creating a new instance of `StorageEvent`."]
58    #[doc = ""]
59    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/StorageEvent/StorageEvent)"]
60    #[doc = ""]
61    #[doc = "*This API requires the following crate features to be activated: `StorageEvent`*"]
62    pub fn new(type_: &str) -> Result<StorageEvent, JsValue>;
63    #[cfg(feature = "StorageEventInit")]
64    #[wasm_bindgen(catch, constructor, js_class = "StorageEvent")]
65    #[doc = "The `new StorageEvent(..)` constructor, creating a new instance of `StorageEvent`."]
66    #[doc = ""]
67    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/StorageEvent/StorageEvent)"]
68    #[doc = ""]
69    #[doc = "*This API requires the following crate features to be activated: `StorageEvent`, `StorageEventInit`*"]
70    pub fn new_with_event_init_dict(
71        type_: &str,
72        event_init_dict: &StorageEventInit,
73    ) -> Result<StorageEvent, JsValue>;
74    #[wasm_bindgen(method, js_class = "StorageEvent", js_name = "initStorageEvent")]
75    #[doc = "The `initStorageEvent()` method."]
76    #[doc = ""]
77    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/StorageEvent/initStorageEvent)"]
78    #[doc = ""]
79    #[doc = "*This API requires the following crate features to be activated: `StorageEvent`*"]
80    pub fn init_storage_event(this: &StorageEvent, type_: &str);
81    #[wasm_bindgen(method, js_class = "StorageEvent", js_name = "initStorageEvent")]
82    #[doc = "The `initStorageEvent()` method."]
83    #[doc = ""]
84    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/StorageEvent/initStorageEvent)"]
85    #[doc = ""]
86    #[doc = "*This API requires the following crate features to be activated: `StorageEvent`*"]
87    pub fn init_storage_event_with_can_bubble(this: &StorageEvent, type_: &str, can_bubble: bool);
88    #[wasm_bindgen(method, js_class = "StorageEvent", js_name = "initStorageEvent")]
89    #[doc = "The `initStorageEvent()` method."]
90    #[doc = ""]
91    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/StorageEvent/initStorageEvent)"]
92    #[doc = ""]
93    #[doc = "*This API requires the following crate features to be activated: `StorageEvent`*"]
94    pub fn init_storage_event_with_can_bubble_and_cancelable(
95        this: &StorageEvent,
96        type_: &str,
97        can_bubble: bool,
98        cancelable: bool,
99    );
100    #[wasm_bindgen(method, js_class = "StorageEvent", js_name = "initStorageEvent")]
101    #[doc = "The `initStorageEvent()` method."]
102    #[doc = ""]
103    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/StorageEvent/initStorageEvent)"]
104    #[doc = ""]
105    #[doc = "*This API requires the following crate features to be activated: `StorageEvent`*"]
106    pub fn init_storage_event_with_can_bubble_and_cancelable_and_key(
107        this: &StorageEvent,
108        type_: &str,
109        can_bubble: bool,
110        cancelable: bool,
111        key: Option<&str>,
112    );
113    #[wasm_bindgen(method, js_class = "StorageEvent", js_name = "initStorageEvent")]
114    #[doc = "The `initStorageEvent()` method."]
115    #[doc = ""]
116    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/StorageEvent/initStorageEvent)"]
117    #[doc = ""]
118    #[doc = "*This API requires the following crate features to be activated: `StorageEvent`*"]
119    pub fn init_storage_event_with_can_bubble_and_cancelable_and_key_and_old_value(
120        this: &StorageEvent,
121        type_: &str,
122        can_bubble: bool,
123        cancelable: bool,
124        key: Option<&str>,
125        old_value: Option<&str>,
126    );
127    #[wasm_bindgen(method, js_class = "StorageEvent", js_name = "initStorageEvent")]
128    #[doc = "The `initStorageEvent()` method."]
129    #[doc = ""]
130    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/StorageEvent/initStorageEvent)"]
131    #[doc = ""]
132    #[doc = "*This API requires the following crate features to be activated: `StorageEvent`*"]
133    pub fn init_storage_event_with_can_bubble_and_cancelable_and_key_and_old_value_and_new_value(
134        this: &StorageEvent,
135        type_: &str,
136        can_bubble: bool,
137        cancelable: bool,
138        key: Option<&str>,
139        old_value: Option<&str>,
140        new_value: Option<&str>,
141    );
142    #[wasm_bindgen(method, js_class = "StorageEvent", js_name = "initStorageEvent")]
143    #[doc = "The `initStorageEvent()` method."]
144    #[doc = ""]
145    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/StorageEvent/initStorageEvent)"]
146    #[doc = ""]
147    #[doc = "*This API requires the following crate features to be activated: `StorageEvent`*"]
148    pub fn init_storage_event_with_can_bubble_and_cancelable_and_key_and_old_value_and_new_value_and_url(
149        this: &StorageEvent,
150        type_: &str,
151        can_bubble: bool,
152        cancelable: bool,
153        key: Option<&str>,
154        old_value: Option<&str>,
155        new_value: Option<&str>,
156        url: Option<&str>,
157    );
158    #[cfg(feature = "Storage")]
159    #[wasm_bindgen(method, js_class = "StorageEvent", js_name = "initStorageEvent")]
160    #[doc = "The `initStorageEvent()` method."]
161    #[doc = ""]
162    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/StorageEvent/initStorageEvent)"]
163    #[doc = ""]
164    #[doc = "*This API requires the following crate features to be activated: `Storage`, `StorageEvent`*"]
165    pub fn init_storage_event_with_can_bubble_and_cancelable_and_key_and_old_value_and_new_value_and_url_and_storage_area(
166        this: &StorageEvent,
167        type_: &str,
168        can_bubble: bool,
169        cancelable: bool,
170        key: Option<&str>,
171        old_value: Option<&str>,
172        new_value: Option<&str>,
173        url: Option<&str>,
174        storage_area: Option<&Storage>,
175    );
176}