web_sys/features/
gen_DataTransfer.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
#![allow(unused_imports)]
#![allow(clippy::all)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
    # [wasm_bindgen (extends = :: js_sys :: Object , js_name = DataTransfer , typescript_type = "DataTransfer")]
    #[derive(Debug, Clone, PartialEq, Eq)]
    #[doc = "The `DataTransfer` class."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `DataTransfer`*"]
    pub type DataTransfer;
    # [wasm_bindgen (structural , method , getter , js_class = "DataTransfer" , js_name = dropEffect)]
    #[doc = "Getter for the `dropEffect` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/dropEffect)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `DataTransfer`*"]
    pub fn drop_effect(this: &DataTransfer) -> String;
    # [wasm_bindgen (structural , method , setter , js_class = "DataTransfer" , js_name = dropEffect)]
    #[doc = "Setter for the `dropEffect` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/dropEffect)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `DataTransfer`*"]
    pub fn set_drop_effect(this: &DataTransfer, value: &str);
    # [wasm_bindgen (structural , method , getter , js_class = "DataTransfer" , js_name = effectAllowed)]
    #[doc = "Getter for the `effectAllowed` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/effectAllowed)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `DataTransfer`*"]
    pub fn effect_allowed(this: &DataTransfer) -> String;
    # [wasm_bindgen (structural , method , setter , js_class = "DataTransfer" , js_name = effectAllowed)]
    #[doc = "Setter for the `effectAllowed` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/effectAllowed)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `DataTransfer`*"]
    pub fn set_effect_allowed(this: &DataTransfer, value: &str);
    #[cfg(feature = "DataTransferItemList")]
    # [wasm_bindgen (structural , method , getter , js_class = "DataTransfer" , js_name = items)]
    #[doc = "Getter for the `items` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/items)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `DataTransfer`, `DataTransferItemList`*"]
    pub fn items(this: &DataTransfer) -> DataTransferItemList;
    # [wasm_bindgen (structural , method , getter , js_class = "DataTransfer" , js_name = types)]
    #[doc = "Getter for the `types` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/types)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `DataTransfer`*"]
    pub fn types(this: &DataTransfer) -> ::js_sys::Array;
    #[cfg(feature = "FileList")]
    # [wasm_bindgen (structural , method , getter , js_class = "DataTransfer" , js_name = files)]
    #[doc = "Getter for the `files` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/files)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `DataTransfer`, `FileList`*"]
    pub fn files(this: &DataTransfer) -> Option<FileList>;
    #[wasm_bindgen(catch, constructor, js_class = "DataTransfer")]
    #[doc = "The `new DataTransfer(..)` constructor, creating a new instance of `DataTransfer`."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/DataTransfer)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `DataTransfer`*"]
    pub fn new() -> Result<DataTransfer, JsValue>;
    # [wasm_bindgen (catch , method , structural , js_class = "DataTransfer" , js_name = clearData)]
    #[doc = "The `clearData()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/clearData)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `DataTransfer`*"]
    pub fn clear_data(this: &DataTransfer) -> Result<(), JsValue>;
    # [wasm_bindgen (catch , method , structural , js_class = "DataTransfer" , js_name = clearData)]
    #[doc = "The `clearData()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/clearData)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `DataTransfer`*"]
    pub fn clear_data_with_format(this: &DataTransfer, format: &str) -> Result<(), JsValue>;
    # [wasm_bindgen (catch , method , structural , js_class = "DataTransfer" , js_name = getData)]
    #[doc = "The `getData()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/getData)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `DataTransfer`*"]
    pub fn get_data(this: &DataTransfer, format: &str) -> Result<String, JsValue>;
    # [wasm_bindgen (catch , method , structural , js_class = "DataTransfer" , js_name = getFiles)]
    #[doc = "The `getFiles()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/getFiles)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `DataTransfer`*"]
    pub fn get_files(this: &DataTransfer) -> Result<::js_sys::Promise, JsValue>;
    # [wasm_bindgen (catch , method , structural , js_class = "DataTransfer" , js_name = getFiles)]
    #[doc = "The `getFiles()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/getFiles)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `DataTransfer`*"]
    pub fn get_files_with_recursive_flag(
        this: &DataTransfer,
        recursive_flag: bool,
    ) -> Result<::js_sys::Promise, JsValue>;
    # [wasm_bindgen (catch , method , structural , js_class = "DataTransfer" , js_name = getFilesAndDirectories)]
    #[doc = "The `getFilesAndDirectories()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/getFilesAndDirectories)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `DataTransfer`*"]
    pub fn get_files_and_directories(this: &DataTransfer) -> Result<::js_sys::Promise, JsValue>;
    # [wasm_bindgen (catch , method , structural , js_class = "DataTransfer" , js_name = setData)]
    #[doc = "The `setData()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/setData)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `DataTransfer`*"]
    pub fn set_data(this: &DataTransfer, format: &str, data: &str) -> Result<(), JsValue>;
    #[cfg(feature = "Element")]
    # [wasm_bindgen (method , structural , js_class = "DataTransfer" , js_name = setDragImage)]
    #[doc = "The `setDragImage()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/setDragImage)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `DataTransfer`, `Element`*"]
    pub fn set_drag_image(this: &DataTransfer, image: &Element, x: i32, y: i32);
}