web_sys/features/
gen_CookieStore.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 #[wasm_bindgen(
8 extends = "EventTarget",
9 extends = "::js_sys::Object",
10 js_name = "CookieStore",
11 typescript_type = "CookieStore"
12 )]
13 #[derive(Debug, Clone, PartialEq, Eq)]
14 #[doc = "The `CookieStore` class."]
15 #[doc = ""]
16 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CookieStore)"]
17 #[doc = ""]
18 #[doc = "*This API requires the following crate features to be activated: `CookieStore`*"]
19 pub type CookieStore;
20 #[wasm_bindgen(method, getter, js_class = "CookieStore", js_name = "onchange")]
21 #[doc = "Getter for the `onchange` field of this object."]
22 #[doc = ""]
23 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CookieStore/onchange)"]
24 #[doc = ""]
25 #[doc = "*This API requires the following crate features to be activated: `CookieStore`*"]
26 pub fn onchange(this: &CookieStore) -> Option<::js_sys::Function>;
27 #[wasm_bindgen(method, setter, js_class = "CookieStore", js_name = "onchange")]
28 #[doc = "Setter for the `onchange` field of this object."]
29 #[doc = ""]
30 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CookieStore/onchange)"]
31 #[doc = ""]
32 #[doc = "*This API requires the following crate features to be activated: `CookieStore`*"]
33 pub fn set_onchange(this: &CookieStore, value: Option<&::js_sys::Function>);
34 #[wasm_bindgen(method, js_class = "CookieStore", js_name = "delete")]
35 #[doc = "The `delete()` method."]
36 #[doc = ""]
37 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CookieStore/delete)"]
38 #[doc = ""]
39 #[doc = "*This API requires the following crate features to be activated: `CookieStore`*"]
40 pub fn delete_with_name(this: &CookieStore, name: &str) -> ::js_sys::Promise;
41 #[cfg(feature = "CookieStoreDeleteOptions")]
42 #[wasm_bindgen(method, js_class = "CookieStore", js_name = "delete")]
43 #[doc = "The `delete()` method."]
44 #[doc = ""]
45 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CookieStore/delete)"]
46 #[doc = ""]
47 #[doc = "*This API requires the following crate features to be activated: `CookieStore`, `CookieStoreDeleteOptions`*"]
48 pub fn delete_with_options(
49 this: &CookieStore,
50 options: &CookieStoreDeleteOptions,
51 ) -> ::js_sys::Promise;
52 #[wasm_bindgen(method, js_class = "CookieStore", js_name = "get")]
53 #[doc = "The `get()` method."]
54 #[doc = ""]
55 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CookieStore/get)"]
56 #[doc = ""]
57 #[doc = "*This API requires the following crate features to be activated: `CookieStore`*"]
58 pub fn get_with_name(this: &CookieStore, name: &str) -> ::js_sys::Promise;
59 #[wasm_bindgen(method, js_class = "CookieStore")]
60 #[doc = "The `get()` method."]
61 #[doc = ""]
62 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CookieStore/get)"]
63 #[doc = ""]
64 #[doc = "*This API requires the following crate features to be activated: `CookieStore`*"]
65 pub fn get(this: &CookieStore) -> ::js_sys::Promise;
66 #[cfg(feature = "CookieStoreGetOptions")]
67 #[wasm_bindgen(method, js_class = "CookieStore", js_name = "get")]
68 #[doc = "The `get()` method."]
69 #[doc = ""]
70 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CookieStore/get)"]
71 #[doc = ""]
72 #[doc = "*This API requires the following crate features to be activated: `CookieStore`, `CookieStoreGetOptions`*"]
73 pub fn get_with_cookie_store_get_options(
74 this: &CookieStore,
75 options: &CookieStoreGetOptions,
76 ) -> ::js_sys::Promise;
77 #[wasm_bindgen(method, js_class = "CookieStore", js_name = "getAll")]
78 #[doc = "The `getAll()` method."]
79 #[doc = ""]
80 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CookieStore/getAll)"]
81 #[doc = ""]
82 #[doc = "*This API requires the following crate features to be activated: `CookieStore`*"]
83 pub fn get_all_with_name(this: &CookieStore, name: &str) -> ::js_sys::Promise;
84 #[wasm_bindgen(method, js_class = "CookieStore", js_name = "getAll")]
85 #[doc = "The `getAll()` method."]
86 #[doc = ""]
87 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CookieStore/getAll)"]
88 #[doc = ""]
89 #[doc = "*This API requires the following crate features to be activated: `CookieStore`*"]
90 pub fn get_all(this: &CookieStore) -> ::js_sys::Promise;
91 #[cfg(feature = "CookieStoreGetOptions")]
92 #[wasm_bindgen(method, js_class = "CookieStore", js_name = "getAll")]
93 #[doc = "The `getAll()` method."]
94 #[doc = ""]
95 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CookieStore/getAll)"]
96 #[doc = ""]
97 #[doc = "*This API requires the following crate features to be activated: `CookieStore`, `CookieStoreGetOptions`*"]
98 pub fn get_all_with_cookie_store_get_options(
99 this: &CookieStore,
100 options: &CookieStoreGetOptions,
101 ) -> ::js_sys::Promise;
102 #[wasm_bindgen(method, js_class = "CookieStore", js_name = "set")]
103 #[doc = "The `set()` method."]
104 #[doc = ""]
105 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CookieStore/set)"]
106 #[doc = ""]
107 #[doc = "*This API requires the following crate features to be activated: `CookieStore`*"]
108 pub fn set_with_name_and_value(
109 this: &CookieStore,
110 name: &str,
111 value: &str,
112 ) -> ::js_sys::Promise;
113 #[cfg(feature = "CookieInit")]
114 #[wasm_bindgen(method, js_class = "CookieStore", js_name = "set")]
115 #[doc = "The `set()` method."]
116 #[doc = ""]
117 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CookieStore/set)"]
118 #[doc = ""]
119 #[doc = "*This API requires the following crate features to be activated: `CookieInit`, `CookieStore`*"]
120 pub fn set_with_options(this: &CookieStore, options: &CookieInit) -> ::js_sys::Promise;
121}