Skip to main content

web_sys/features/
gen_TcpSocketErrorEvent.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 = "Event",
9        extends = "::js_sys::Object",
10        js_name = "TCPSocketErrorEvent",
11        typescript_type = "TCPSocketErrorEvent"
12    )]
13    #[derive(Debug, Clone, PartialEq, Eq)]
14    #[doc = "The `TcpSocketErrorEvent` class."]
15    #[doc = ""]
16    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TCPSocketErrorEvent)"]
17    #[doc = ""]
18    #[doc = "*This API requires the following crate features to be activated: `TcpSocketErrorEvent`*"]
19    pub type TcpSocketErrorEvent;
20    #[wasm_bindgen(method, getter, js_class = "TCPSocketErrorEvent", js_name = "name")]
21    #[doc = "Getter for the `name` field of this object."]
22    #[doc = ""]
23    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TCPSocketErrorEvent/name)"]
24    #[doc = ""]
25    #[doc = "*This API requires the following crate features to be activated: `TcpSocketErrorEvent`*"]
26    pub fn name(this: &TcpSocketErrorEvent) -> ::alloc::string::String;
27    #[wasm_bindgen(method, getter, js_class = "TCPSocketErrorEvent", js_name = "message")]
28    #[doc = "Getter for the `message` field of this object."]
29    #[doc = ""]
30    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TCPSocketErrorEvent/message)"]
31    #[doc = ""]
32    #[doc = "*This API requires the following crate features to be activated: `TcpSocketErrorEvent`*"]
33    pub fn message(this: &TcpSocketErrorEvent) -> ::alloc::string::String;
34    #[wasm_bindgen(catch, constructor, js_class = "TCPSocketErrorEvent")]
35    #[doc = "The `new TcpSocketErrorEvent(..)` constructor, creating a new instance of `TcpSocketErrorEvent`."]
36    #[doc = ""]
37    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TCPSocketErrorEvent/TCPSocketErrorEvent)"]
38    #[doc = ""]
39    #[doc = "*This API requires the following crate features to be activated: `TcpSocketErrorEvent`*"]
40    pub fn new(type_: &str) -> Result<TcpSocketErrorEvent, JsValue>;
41    #[cfg(feature = "TcpSocketErrorEventInit")]
42    #[wasm_bindgen(catch, constructor, js_class = "TCPSocketErrorEvent")]
43    #[doc = "The `new TcpSocketErrorEvent(..)` constructor, creating a new instance of `TcpSocketErrorEvent`."]
44    #[doc = ""]
45    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TCPSocketErrorEvent/TCPSocketErrorEvent)"]
46    #[doc = ""]
47    #[doc = "*This API requires the following crate features to be activated: `TcpSocketErrorEvent`, `TcpSocketErrorEventInit`*"]
48    pub fn new_with_event_init_dict(
49        type_: &str,
50        event_init_dict: &TcpSocketErrorEventInit,
51    ) -> Result<TcpSocketErrorEvent, JsValue>;
52}