maxcountryman_web_sys/features/
gen_PresentationConnection.rs1#![allow(unused_imports)]
2use super::*;
3use wasm_bindgen::prelude::*;
4#[wasm_bindgen]
5extern "C" {
6 # [wasm_bindgen (extends = EventTarget , extends = :: js_sys :: Object , js_name = PresentationConnection , typescript_type = "PresentationConnection")]
7 #[derive(Debug, Clone, PartialEq, Eq)]
8 #[doc = "The `PresentationConnection` class."]
9 #[doc = ""]
10 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection)"]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`*"]
13 pub type PresentationConnection;
14 # [wasm_bindgen (structural , method , getter , js_class = "PresentationConnection" , js_name = id)]
15 #[doc = "Getter for the `id` field of this object."]
16 #[doc = ""]
17 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection/id)"]
18 #[doc = ""]
19 #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`*"]
20 pub fn id(this: &PresentationConnection) -> String;
21 # [wasm_bindgen (structural , method , getter , js_class = "PresentationConnection" , js_name = url)]
22 #[doc = "Getter for the `url` field of this object."]
23 #[doc = ""]
24 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection/url)"]
25 #[doc = ""]
26 #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`*"]
27 pub fn url(this: &PresentationConnection) -> String;
28 #[cfg(feature = "PresentationConnectionState")]
29 # [wasm_bindgen (structural , method , getter , js_class = "PresentationConnection" , js_name = state)]
30 #[doc = "Getter for the `state` field of this object."]
31 #[doc = ""]
32 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection/state)"]
33 #[doc = ""]
34 #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`, `PresentationConnectionState`*"]
35 pub fn state(this: &PresentationConnection) -> PresentationConnectionState;
36 # [wasm_bindgen (structural , method , getter , js_class = "PresentationConnection" , js_name = onconnect)]
37 #[doc = "Getter for the `onconnect` field of this object."]
38 #[doc = ""]
39 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection/onconnect)"]
40 #[doc = ""]
41 #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`*"]
42 pub fn onconnect(this: &PresentationConnection) -> Option<::js_sys::Function>;
43 # [wasm_bindgen (structural , method , setter , js_class = "PresentationConnection" , js_name = onconnect)]
44 #[doc = "Setter for the `onconnect` field of this object."]
45 #[doc = ""]
46 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection/onconnect)"]
47 #[doc = ""]
48 #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`*"]
49 pub fn set_onconnect(this: &PresentationConnection, value: Option<&::js_sys::Function>);
50 # [wasm_bindgen (structural , method , getter , js_class = "PresentationConnection" , js_name = onclose)]
51 #[doc = "Getter for the `onclose` field of this object."]
52 #[doc = ""]
53 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection/onclose)"]
54 #[doc = ""]
55 #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`*"]
56 pub fn onclose(this: &PresentationConnection) -> Option<::js_sys::Function>;
57 # [wasm_bindgen (structural , method , setter , js_class = "PresentationConnection" , js_name = onclose)]
58 #[doc = "Setter for the `onclose` field of this object."]
59 #[doc = ""]
60 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection/onclose)"]
61 #[doc = ""]
62 #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`*"]
63 pub fn set_onclose(this: &PresentationConnection, value: Option<&::js_sys::Function>);
64 # [wasm_bindgen (structural , method , getter , js_class = "PresentationConnection" , js_name = onterminate)]
65 #[doc = "Getter for the `onterminate` field of this object."]
66 #[doc = ""]
67 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection/onterminate)"]
68 #[doc = ""]
69 #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`*"]
70 pub fn onterminate(this: &PresentationConnection) -> Option<::js_sys::Function>;
71 # [wasm_bindgen (structural , method , setter , js_class = "PresentationConnection" , js_name = onterminate)]
72 #[doc = "Setter for the `onterminate` field of this object."]
73 #[doc = ""]
74 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection/onterminate)"]
75 #[doc = ""]
76 #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`*"]
77 pub fn set_onterminate(this: &PresentationConnection, value: Option<&::js_sys::Function>);
78 #[cfg(feature = "PresentationConnectionBinaryType")]
79 # [wasm_bindgen (structural , method , getter , js_class = "PresentationConnection" , js_name = binaryType)]
80 #[doc = "Getter for the `binaryType` field of this object."]
81 #[doc = ""]
82 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection/binaryType)"]
83 #[doc = ""]
84 #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`, `PresentationConnectionBinaryType`*"]
85 pub fn binary_type(this: &PresentationConnection) -> PresentationConnectionBinaryType;
86 #[cfg(feature = "PresentationConnectionBinaryType")]
87 # [wasm_bindgen (structural , method , setter , js_class = "PresentationConnection" , js_name = binaryType)]
88 #[doc = "Setter for the `binaryType` field of this object."]
89 #[doc = ""]
90 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection/binaryType)"]
91 #[doc = ""]
92 #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`, `PresentationConnectionBinaryType`*"]
93 pub fn set_binary_type(this: &PresentationConnection, value: PresentationConnectionBinaryType);
94 # [wasm_bindgen (structural , method , getter , js_class = "PresentationConnection" , js_name = onmessage)]
95 #[doc = "Getter for the `onmessage` field of this object."]
96 #[doc = ""]
97 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection/onmessage)"]
98 #[doc = ""]
99 #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`*"]
100 pub fn onmessage(this: &PresentationConnection) -> Option<::js_sys::Function>;
101 # [wasm_bindgen (structural , method , setter , js_class = "PresentationConnection" , js_name = onmessage)]
102 #[doc = "Setter for the `onmessage` field of this object."]
103 #[doc = ""]
104 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection/onmessage)"]
105 #[doc = ""]
106 #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`*"]
107 pub fn set_onmessage(this: &PresentationConnection, value: Option<&::js_sys::Function>);
108 # [wasm_bindgen (catch , method , structural , js_class = "PresentationConnection" , js_name = close)]
109 #[doc = "The `close()` method."]
110 #[doc = ""]
111 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection/close)"]
112 #[doc = ""]
113 #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`*"]
114 pub fn close(this: &PresentationConnection) -> Result<(), JsValue>;
115 # [wasm_bindgen (catch , method , structural , js_class = "PresentationConnection" , js_name = send)]
116 #[doc = "The `send()` method."]
117 #[doc = ""]
118 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection/send)"]
119 #[doc = ""]
120 #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`*"]
121 pub fn send_with_str(this: &PresentationConnection, data: &str) -> Result<(), JsValue>;
122 #[cfg(feature = "Blob")]
123 # [wasm_bindgen (catch , method , structural , js_class = "PresentationConnection" , js_name = send)]
124 #[doc = "The `send()` method."]
125 #[doc = ""]
126 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection/send)"]
127 #[doc = ""]
128 #[doc = "*This API requires the following crate features to be activated: `Blob`, `PresentationConnection`*"]
129 pub fn send_with_blob(this: &PresentationConnection, data: &Blob) -> Result<(), JsValue>;
130 # [wasm_bindgen (catch , method , structural , js_class = "PresentationConnection" , js_name = send)]
131 #[doc = "The `send()` method."]
132 #[doc = ""]
133 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection/send)"]
134 #[doc = ""]
135 #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`*"]
136 pub fn send_with_array_buffer(
137 this: &PresentationConnection,
138 data: &::js_sys::ArrayBuffer,
139 ) -> Result<(), JsValue>;
140 # [wasm_bindgen (catch , method , structural , js_class = "PresentationConnection" , js_name = send)]
141 #[doc = "The `send()` method."]
142 #[doc = ""]
143 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection/send)"]
144 #[doc = ""]
145 #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`*"]
146 pub fn send_with_array_buffer_view(
147 this: &PresentationConnection,
148 data: &::js_sys::Object,
149 ) -> Result<(), JsValue>;
150 # [wasm_bindgen (catch , method , structural , js_class = "PresentationConnection" , js_name = send)]
151 #[doc = "The `send()` method."]
152 #[doc = ""]
153 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection/send)"]
154 #[doc = ""]
155 #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`*"]
156 pub fn send_with_u8_array(this: &PresentationConnection, data: &[u8]) -> Result<(), JsValue>;
157 # [wasm_bindgen (catch , method , structural , js_class = "PresentationConnection" , js_name = terminate)]
158 #[doc = "The `terminate()` method."]
159 #[doc = ""]
160 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection/terminate)"]
161 #[doc = ""]
162 #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`*"]
163 pub fn terminate(this: &PresentationConnection) -> Result<(), JsValue>;
164}