web_sys/features/
gen_TcpSocketEvent.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 # [wasm_bindgen (extends = Event , extends = :: js_sys :: Object , js_name = TCPSocketEvent , typescript_type = "TCPSocketEvent")]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `TcpSocketEvent` class."]
10 #[doc = ""]
11 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TCPSocketEvent)"]
12 #[doc = ""]
13 #[doc = "*This API requires the following crate features to be activated: `TcpSocketEvent`*"]
14 pub type TcpSocketEvent;
15 # [wasm_bindgen (structural , method , getter , js_class = "TCPSocketEvent" , js_name = data)]
16 #[doc = "Getter for the `data` field of this object."]
17 #[doc = ""]
18 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TCPSocketEvent/data)"]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `TcpSocketEvent`*"]
21 pub fn data(this: &TcpSocketEvent) -> ::wasm_bindgen::JsValue;
22 #[wasm_bindgen(catch, constructor, js_class = "TCPSocketEvent")]
23 #[doc = "The `new TcpSocketEvent(..)` constructor, creating a new instance of `TcpSocketEvent`."]
24 #[doc = ""]
25 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TCPSocketEvent/TCPSocketEvent)"]
26 #[doc = ""]
27 #[doc = "*This API requires the following crate features to be activated: `TcpSocketEvent`*"]
28 pub fn new(type_: &str) -> Result<TcpSocketEvent, JsValue>;
29 #[cfg(feature = "TcpSocketEventInit")]
30 #[wasm_bindgen(catch, constructor, js_class = "TCPSocketEvent")]
31 #[doc = "The `new TcpSocketEvent(..)` constructor, creating a new instance of `TcpSocketEvent`."]
32 #[doc = ""]
33 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TCPSocketEvent/TCPSocketEvent)"]
34 #[doc = ""]
35 #[doc = "*This API requires the following crate features to be activated: `TcpSocketEvent`, `TcpSocketEventInit`*"]
36 pub fn new_with_event_init_dict(
37 type_: &str,
38 event_init_dict: &TcpSocketEventInit,
39 ) -> Result<TcpSocketEvent, JsValue>;
40}