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