Skip to main content

web_sys/features/
gen_Client.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 = "Client",
10        typescript_type = "Client"
11    )]
12    #[derive(Debug, Clone, PartialEq, Eq)]
13    #[doc = "The `Client` class."]
14    #[doc = ""]
15    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Client)"]
16    #[doc = ""]
17    #[doc = "*This API requires the following crate features to be activated: `Client`*"]
18    pub type Client;
19    #[wasm_bindgen(method, getter, js_class = "Client", js_name = "url")]
20    #[doc = "Getter for the `url` field of this object."]
21    #[doc = ""]
22    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Client/url)"]
23    #[doc = ""]
24    #[doc = "*This API requires the following crate features to be activated: `Client`*"]
25    pub fn url(this: &Client) -> ::alloc::string::String;
26    #[cfg(feature = "FrameType")]
27    #[wasm_bindgen(method, getter, js_class = "Client", js_name = "frameType")]
28    #[doc = "Getter for the `frameType` field of this object."]
29    #[doc = ""]
30    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Client/frameType)"]
31    #[doc = ""]
32    #[doc = "*This API requires the following crate features to be activated: `Client`, `FrameType`*"]
33    pub fn frame_type(this: &Client) -> FrameType;
34    #[cfg(feature = "ClientType")]
35    #[wasm_bindgen(method, getter, js_class = "Client", js_name = "type")]
36    #[doc = "Getter for the `type` field of this object."]
37    #[doc = ""]
38    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Client/type)"]
39    #[doc = ""]
40    #[doc = "*This API requires the following crate features to be activated: `Client`, `ClientType`*"]
41    pub fn type_(this: &Client) -> ClientType;
42    #[wasm_bindgen(method, getter, js_class = "Client", js_name = "id")]
43    #[doc = "Getter for the `id` field of this object."]
44    #[doc = ""]
45    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Client/id)"]
46    #[doc = ""]
47    #[doc = "*This API requires the following crate features to be activated: `Client`*"]
48    pub fn id(this: &Client) -> ::alloc::string::String;
49    #[wasm_bindgen(catch, method, js_class = "Client", js_name = "postMessage")]
50    #[doc = "The `postMessage()` method."]
51    #[doc = ""]
52    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Client/postMessage)"]
53    #[doc = ""]
54    #[doc = "*This API requires the following crate features to be activated: `Client`*"]
55    pub fn post_message(this: &Client, message: &::wasm_bindgen::JsValue) -> Result<(), JsValue>;
56    #[wasm_bindgen(catch, method, js_class = "Client", js_name = "postMessage")]
57    #[doc = "The `postMessage()` method."]
58    #[doc = ""]
59    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Client/postMessage)"]
60    #[doc = ""]
61    #[doc = "*This API requires the following crate features to be activated: `Client`*"]
62    pub fn post_message_with_transfer(
63        this: &Client,
64        message: &::wasm_bindgen::JsValue,
65        transfer: &::wasm_bindgen::JsValue,
66    ) -> Result<(), JsValue>;
67}