maxcountryman_web_sys/features/
gen_WindowClient.rs

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