web_sys/features/
gen_Clipboard.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 # [wasm_bindgen (extends = EventTarget , extends = :: js_sys :: Object , js_name = Clipboard , typescript_type = "Clipboard")]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `Clipboard` class."]
10 #[doc = ""]
11 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Clipboard)"]
12 #[doc = ""]
13 #[doc = "*This API requires the following crate features to be activated: `Clipboard`*"]
14 pub type Clipboard;
15 # [wasm_bindgen (method , structural , js_class = "Clipboard" , js_name = read)]
16 #[doc = "The `read()` method."]
17 #[doc = ""]
18 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Clipboard/read)"]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `Clipboard`*"]
21 pub fn read(this: &Clipboard) -> ::js_sys::Promise;
22 #[cfg(web_sys_unstable_apis)]
23 #[cfg(feature = "ClipboardUnsanitizedFormats")]
24 # [wasm_bindgen (method , structural , js_class = "Clipboard" , js_name = read)]
25 #[doc = "The `read()` method."]
26 #[doc = ""]
27 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Clipboard/read)"]
28 #[doc = ""]
29 #[doc = "*This API requires the following crate features to be activated: `Clipboard`, `ClipboardUnsanitizedFormats`*"]
30 #[doc = ""]
31 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
32 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
33 pub fn read_with_formats(
34 this: &Clipboard,
35 formats: &ClipboardUnsanitizedFormats,
36 ) -> ::js_sys::Promise;
37 # [wasm_bindgen (method , structural , js_class = "Clipboard" , js_name = readText)]
38 #[doc = "The `readText()` method."]
39 #[doc = ""]
40 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Clipboard/readText)"]
41 #[doc = ""]
42 #[doc = "*This API requires the following crate features to be activated: `Clipboard`*"]
43 pub fn read_text(this: &Clipboard) -> ::js_sys::Promise;
44 # [wasm_bindgen (method , structural , js_class = "Clipboard" , js_name = write)]
45 #[doc = "The `write()` method."]
46 #[doc = ""]
47 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Clipboard/write)"]
48 #[doc = ""]
49 #[doc = "*This API requires the following crate features to be activated: `Clipboard`*"]
50 pub fn write(this: &Clipboard, data: &::wasm_bindgen::JsValue) -> ::js_sys::Promise;
51 # [wasm_bindgen (method , structural , js_class = "Clipboard" , js_name = writeText)]
52 #[doc = "The `writeText()` method."]
53 #[doc = ""]
54 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Clipboard/writeText)"]
55 #[doc = ""]
56 #[doc = "*This API requires the following crate features to be activated: `Clipboard`*"]
57 pub fn write_text(this: &Clipboard, data: &str) -> ::js_sys::Promise;
58}