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