web_sys/features/
gen_BlobEvent.rs

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