web_sys/features/
gen_TcpServerSocketEvent.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 = TCPServerSocketEvent , typescript_type = "TCPServerSocketEvent")]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `TcpServerSocketEvent` class."]
10 #[doc = ""]
11 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TCPServerSocketEvent)"]
12 #[doc = ""]
13 #[doc = "*This API requires the following crate features to be activated: `TcpServerSocketEvent`*"]
14 pub type TcpServerSocketEvent;
15 #[cfg(feature = "TcpSocket")]
16 # [wasm_bindgen (structural , method , getter , js_class = "TCPServerSocketEvent" , js_name = socket)]
17 #[doc = "Getter for the `socket` field of this object."]
18 #[doc = ""]
19 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TCPServerSocketEvent/socket)"]
20 #[doc = ""]
21 #[doc = "*This API requires the following crate features to be activated: `TcpServerSocketEvent`, `TcpSocket`*"]
22 pub fn socket(this: &TcpServerSocketEvent) -> TcpSocket;
23 #[wasm_bindgen(catch, constructor, js_class = "TCPServerSocketEvent")]
24 #[doc = "The `new TcpServerSocketEvent(..)` constructor, creating a new instance of `TcpServerSocketEvent`."]
25 #[doc = ""]
26 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TCPServerSocketEvent/TCPServerSocketEvent)"]
27 #[doc = ""]
28 #[doc = "*This API requires the following crate features to be activated: `TcpServerSocketEvent`*"]
29 pub fn new(type_: &str) -> Result<TcpServerSocketEvent, JsValue>;
30 #[cfg(feature = "TcpServerSocketEventInit")]
31 #[wasm_bindgen(catch, constructor, js_class = "TCPServerSocketEvent")]
32 #[doc = "The `new TcpServerSocketEvent(..)` constructor, creating a new instance of `TcpServerSocketEvent`."]
33 #[doc = ""]
34 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TCPServerSocketEvent/TCPServerSocketEvent)"]
35 #[doc = ""]
36 #[doc = "*This API requires the following crate features to be activated: `TcpServerSocketEvent`, `TcpServerSocketEventInit`*"]
37 pub fn new_with_event_init_dict(
38 type_: &str,
39 event_init_dict: &TcpServerSocketEventInit,
40 ) -> Result<TcpServerSocketEvent, JsValue>;
41}