Skip to main content

web_sys/features/
gen_Location.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 = "::js_sys::Object",
9        js_name = "Location",
10        typescript_type = "Location"
11    )]
12    #[derive(Debug, Clone, PartialEq, Eq)]
13    #[doc = "The `Location` class."]
14    #[doc = ""]
15    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Location)"]
16    #[doc = ""]
17    #[doc = "*This API requires the following crate features to be activated: `Location`*"]
18    pub type Location;
19    #[wasm_bindgen(catch, method, getter, js_class = "Location", js_name = "href")]
20    #[doc = "Getter for the `href` field of this object."]
21    #[doc = ""]
22    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Location/href)"]
23    #[doc = ""]
24    #[doc = "*This API requires the following crate features to be activated: `Location`*"]
25    pub fn href(this: &Location) -> Result<::alloc::string::String, JsValue>;
26    #[wasm_bindgen(catch, method, setter, js_class = "Location", js_name = "href")]
27    #[doc = "Setter for the `href` field of this object."]
28    #[doc = ""]
29    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Location/href)"]
30    #[doc = ""]
31    #[doc = "*This API requires the following crate features to be activated: `Location`*"]
32    pub fn set_href(this: &Location, value: &str) -> Result<(), JsValue>;
33    #[wasm_bindgen(catch, method, getter, js_class = "Location", js_name = "origin")]
34    #[doc = "Getter for the `origin` field of this object."]
35    #[doc = ""]
36    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Location/origin)"]
37    #[doc = ""]
38    #[doc = "*This API requires the following crate features to be activated: `Location`*"]
39    pub fn origin(this: &Location) -> Result<::alloc::string::String, JsValue>;
40    #[wasm_bindgen(catch, method, getter, js_class = "Location", js_name = "protocol")]
41    #[doc = "Getter for the `protocol` field of this object."]
42    #[doc = ""]
43    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Location/protocol)"]
44    #[doc = ""]
45    #[doc = "*This API requires the following crate features to be activated: `Location`*"]
46    pub fn protocol(this: &Location) -> Result<::alloc::string::String, JsValue>;
47    #[wasm_bindgen(catch, method, setter, js_class = "Location", js_name = "protocol")]
48    #[doc = "Setter for the `protocol` field of this object."]
49    #[doc = ""]
50    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Location/protocol)"]
51    #[doc = ""]
52    #[doc = "*This API requires the following crate features to be activated: `Location`*"]
53    pub fn set_protocol(this: &Location, value: &str) -> Result<(), JsValue>;
54    #[wasm_bindgen(catch, method, getter, js_class = "Location", js_name = "host")]
55    #[doc = "Getter for the `host` field of this object."]
56    #[doc = ""]
57    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Location/host)"]
58    #[doc = ""]
59    #[doc = "*This API requires the following crate features to be activated: `Location`*"]
60    pub fn host(this: &Location) -> Result<::alloc::string::String, JsValue>;
61    #[wasm_bindgen(catch, method, setter, js_class = "Location", js_name = "host")]
62    #[doc = "Setter for the `host` field of this object."]
63    #[doc = ""]
64    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Location/host)"]
65    #[doc = ""]
66    #[doc = "*This API requires the following crate features to be activated: `Location`*"]
67    pub fn set_host(this: &Location, value: &str) -> Result<(), JsValue>;
68    #[wasm_bindgen(catch, method, getter, js_class = "Location", js_name = "hostname")]
69    #[doc = "Getter for the `hostname` field of this object."]
70    #[doc = ""]
71    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Location/hostname)"]
72    #[doc = ""]
73    #[doc = "*This API requires the following crate features to be activated: `Location`*"]
74    pub fn hostname(this: &Location) -> Result<::alloc::string::String, JsValue>;
75    #[wasm_bindgen(catch, method, setter, js_class = "Location", js_name = "hostname")]
76    #[doc = "Setter for the `hostname` field of this object."]
77    #[doc = ""]
78    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Location/hostname)"]
79    #[doc = ""]
80    #[doc = "*This API requires the following crate features to be activated: `Location`*"]
81    pub fn set_hostname(this: &Location, value: &str) -> Result<(), JsValue>;
82    #[wasm_bindgen(catch, method, getter, js_class = "Location", js_name = "port")]
83    #[doc = "Getter for the `port` field of this object."]
84    #[doc = ""]
85    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Location/port)"]
86    #[doc = ""]
87    #[doc = "*This API requires the following crate features to be activated: `Location`*"]
88    pub fn port(this: &Location) -> Result<::alloc::string::String, JsValue>;
89    #[wasm_bindgen(catch, method, setter, js_class = "Location", js_name = "port")]
90    #[doc = "Setter for the `port` field of this object."]
91    #[doc = ""]
92    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Location/port)"]
93    #[doc = ""]
94    #[doc = "*This API requires the following crate features to be activated: `Location`*"]
95    pub fn set_port(this: &Location, value: &str) -> Result<(), JsValue>;
96    #[wasm_bindgen(catch, method, getter, js_class = "Location", js_name = "pathname")]
97    #[doc = "Getter for the `pathname` field of this object."]
98    #[doc = ""]
99    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Location/pathname)"]
100    #[doc = ""]
101    #[doc = "*This API requires the following crate features to be activated: `Location`*"]
102    pub fn pathname(this: &Location) -> Result<::alloc::string::String, JsValue>;
103    #[wasm_bindgen(catch, method, setter, js_class = "Location", js_name = "pathname")]
104    #[doc = "Setter for the `pathname` field of this object."]
105    #[doc = ""]
106    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Location/pathname)"]
107    #[doc = ""]
108    #[doc = "*This API requires the following crate features to be activated: `Location`*"]
109    pub fn set_pathname(this: &Location, value: &str) -> Result<(), JsValue>;
110    #[wasm_bindgen(catch, method, getter, js_class = "Location", js_name = "search")]
111    #[doc = "Getter for the `search` field of this object."]
112    #[doc = ""]
113    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Location/search)"]
114    #[doc = ""]
115    #[doc = "*This API requires the following crate features to be activated: `Location`*"]
116    pub fn search(this: &Location) -> Result<::alloc::string::String, JsValue>;
117    #[wasm_bindgen(catch, method, setter, js_class = "Location", js_name = "search")]
118    #[doc = "Setter for the `search` field of this object."]
119    #[doc = ""]
120    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Location/search)"]
121    #[doc = ""]
122    #[doc = "*This API requires the following crate features to be activated: `Location`*"]
123    pub fn set_search(this: &Location, value: &str) -> Result<(), JsValue>;
124    #[wasm_bindgen(catch, method, getter, js_class = "Location", js_name = "hash")]
125    #[doc = "Getter for the `hash` field of this object."]
126    #[doc = ""]
127    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Location/hash)"]
128    #[doc = ""]
129    #[doc = "*This API requires the following crate features to be activated: `Location`*"]
130    pub fn hash(this: &Location) -> Result<::alloc::string::String, JsValue>;
131    #[wasm_bindgen(catch, method, setter, js_class = "Location", js_name = "hash")]
132    #[doc = "Setter for the `hash` field of this object."]
133    #[doc = ""]
134    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Location/hash)"]
135    #[doc = ""]
136    #[doc = "*This API requires the following crate features to be activated: `Location`*"]
137    pub fn set_hash(this: &Location, value: &str) -> Result<(), JsValue>;
138    #[wasm_bindgen(catch, method, js_class = "Location")]
139    #[doc = "The `assign()` method."]
140    #[doc = ""]
141    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Location/assign)"]
142    #[doc = ""]
143    #[doc = "*This API requires the following crate features to be activated: `Location`*"]
144    pub fn assign(this: &Location, url: &str) -> Result<(), JsValue>;
145    #[wasm_bindgen(catch, method, js_class = "Location")]
146    #[doc = "The `reload()` method."]
147    #[doc = ""]
148    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Location/reload)"]
149    #[doc = ""]
150    #[doc = "*This API requires the following crate features to be activated: `Location`*"]
151    pub fn reload(this: &Location) -> Result<(), JsValue>;
152    #[wasm_bindgen(catch, method, js_class = "Location", js_name = "reload")]
153    #[doc = "The `reload()` method."]
154    #[doc = ""]
155    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Location/reload)"]
156    #[doc = ""]
157    #[doc = "*This API requires the following crate features to be activated: `Location`*"]
158    pub fn reload_with_forceget(this: &Location, forceget: bool) -> Result<(), JsValue>;
159    #[wasm_bindgen(catch, method, js_class = "Location")]
160    #[doc = "The `replace()` method."]
161    #[doc = ""]
162    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Location/replace)"]
163    #[doc = ""]
164    #[doc = "*This API requires the following crate features to be activated: `Location`*"]
165    pub fn replace(this: &Location, url: &str) -> Result<(), JsValue>;
166}