Skip to main content

web_sys/features/
gen_WindowClient.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 = "Client",
9        extends = "::js_sys::Object",
10        js_name = "WindowClient",
11        typescript_type = "WindowClient"
12    )]
13    #[derive(Debug, Clone, PartialEq, Eq)]
14    #[doc = "The `WindowClient` class."]
15    #[doc = ""]
16    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WindowClient)"]
17    #[doc = ""]
18    #[doc = "*This API requires the following crate features to be activated: `WindowClient`*"]
19    pub type WindowClient;
20    #[cfg(feature = "VisibilityState")]
21    #[wasm_bindgen(method, getter, js_class = "WindowClient", js_name = "visibilityState")]
22    #[doc = "Getter for the `visibilityState` field of this object."]
23    #[doc = ""]
24    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WindowClient/visibilityState)"]
25    #[doc = ""]
26    #[doc = "*This API requires the following crate features to be activated: `VisibilityState`, `WindowClient`*"]
27    pub fn visibility_state(this: &WindowClient) -> VisibilityState;
28    #[wasm_bindgen(method, getter, js_class = "WindowClient", js_name = "focused")]
29    #[doc = "Getter for the `focused` field of this object."]
30    #[doc = ""]
31    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WindowClient/focused)"]
32    #[doc = ""]
33    #[doc = "*This API requires the following crate features to be activated: `WindowClient`*"]
34    pub fn focused(this: &WindowClient) -> bool;
35    #[wasm_bindgen(catch, method, js_class = "WindowClient")]
36    #[doc = "The `focus()` method."]
37    #[doc = ""]
38    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WindowClient/focus)"]
39    #[doc = ""]
40    #[doc = "*This API requires the following crate features to be activated: `WindowClient`*"]
41    pub fn focus(this: &WindowClient) -> Result<::js_sys::Promise, JsValue>;
42    #[wasm_bindgen(catch, method, js_class = "WindowClient")]
43    #[doc = "The `navigate()` method."]
44    #[doc = ""]
45    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WindowClient/navigate)"]
46    #[doc = ""]
47    #[doc = "*This API requires the following crate features to be activated: `WindowClient`*"]
48    pub fn navigate(this: &WindowClient, url: &str) -> Result<::js_sys::Promise, JsValue>;
49}