web_sys/features/
gen_ClipboardItem.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 #[wasm_bindgen(
8 extends = "::js_sys::Object",
9 js_name = "ClipboardItem",
10 typescript_type = "ClipboardItem"
11 )]
12 #[derive(Debug, Clone, PartialEq, Eq)]
13 #[doc = "The `ClipboardItem` class."]
14 #[doc = ""]
15 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ClipboardItem)"]
16 #[doc = ""]
17 #[doc = "*This API requires the following crate features to be activated: `ClipboardItem`*"]
18 pub type ClipboardItem;
19 #[cfg(feature = "PresentationStyle")]
20 #[wasm_bindgen(
21 method,
22 getter,
23 js_class = "ClipboardItem",
24 js_name = "presentationStyle"
25 )]
26 #[doc = "Getter for the `presentationStyle` field of this object."]
27 #[doc = ""]
28 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ClipboardItem/presentationStyle)"]
29 #[doc = ""]
30 #[doc = "*This API requires the following crate features to be activated: `ClipboardItem`, `PresentationStyle`*"]
31 pub fn presentation_style(this: &ClipboardItem) -> PresentationStyle;
32 #[wasm_bindgen(method, getter, js_class = "ClipboardItem", js_name = "types")]
33 #[doc = "Getter for the `types` field of this object."]
34 #[doc = ""]
35 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ClipboardItem/types)"]
36 #[doc = ""]
37 #[doc = "*This API requires the following crate features to be activated: `ClipboardItem`*"]
38 pub fn types(this: &ClipboardItem) -> ::js_sys::Array;
39 #[wasm_bindgen(catch, constructor, js_class = "ClipboardItem")]
40 #[doc = "The `new ClipboardItem(..)` constructor, creating a new instance of `ClipboardItem`."]
41 #[doc = ""]
42 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ClipboardItem/ClipboardItem)"]
43 #[doc = ""]
44 #[doc = "*This API requires the following crate features to be activated: `ClipboardItem`*"]
45 pub fn new_with_record_from_str_to_str_promise(
46 items: &::js_sys::Object,
47 ) -> Result<ClipboardItem, JsValue>;
48 #[wasm_bindgen(catch, constructor, js_class = "ClipboardItem")]
49 #[doc = "The `new ClipboardItem(..)` constructor, creating a new instance of `ClipboardItem`."]
50 #[doc = ""]
51 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ClipboardItem/ClipboardItem)"]
52 #[doc = ""]
53 #[doc = "*This API requires the following crate features to be activated: `ClipboardItem`*"]
54 pub fn new_with_record_from_str_to_blob_promise(
55 items: &::js_sys::Object,
56 ) -> Result<ClipboardItem, JsValue>;
57 #[cfg(feature = "ClipboardItemOptions")]
58 #[wasm_bindgen(catch, constructor, js_class = "ClipboardItem")]
59 #[doc = "The `new ClipboardItem(..)` constructor, creating a new instance of `ClipboardItem`."]
60 #[doc = ""]
61 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ClipboardItem/ClipboardItem)"]
62 #[doc = ""]
63 #[doc = "*This API requires the following crate features to be activated: `ClipboardItem`, `ClipboardItemOptions`*"]
64 pub fn new_with_record_from_str_to_str_promise_and_options(
65 items: &::js_sys::Object,
66 options: &ClipboardItemOptions,
67 ) -> Result<ClipboardItem, JsValue>;
68 #[cfg(feature = "ClipboardItemOptions")]
69 #[wasm_bindgen(catch, constructor, js_class = "ClipboardItem")]
70 #[doc = "The `new ClipboardItem(..)` constructor, creating a new instance of `ClipboardItem`."]
71 #[doc = ""]
72 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ClipboardItem/ClipboardItem)"]
73 #[doc = ""]
74 #[doc = "*This API requires the following crate features to be activated: `ClipboardItem`, `ClipboardItemOptions`*"]
75 pub fn new_with_record_from_str_to_blob_promise_and_options(
76 items: &::js_sys::Object,
77 options: &ClipboardItemOptions,
78 ) -> Result<ClipboardItem, JsValue>;
79 #[wasm_bindgen(method, js_class = "ClipboardItem", js_name = "getType")]
80 #[doc = "The `getType()` method."]
81 #[doc = ""]
82 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ClipboardItem/getType)"]
83 #[doc = ""]
84 #[doc = "*This API requires the following crate features to be activated: `ClipboardItem`*"]
85 pub fn get_type(this: &ClipboardItem, type_: &str) -> ::js_sys::Promise;
86 #[wasm_bindgen(static_method_of = "ClipboardItem", js_class = "ClipboardItem")]
87 #[doc = "The `supports()` method."]
88 #[doc = ""]
89 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ClipboardItem/supports_static)"]
90 #[doc = ""]
91 #[doc = "*This API requires the following crate features to be activated: `ClipboardItem`*"]
92 pub fn supports(type_: &str) -> bool;
93}