dlt.getClipboard
Introduction
Get clipboard data.
Note: This interface may involve privacy issues, so use it carefully.
Parameters
Object object
| Property | Type | Default | Required | Description |
|---|---|---|---|---|
| success | function | No | Callback function for a successful call | |
| fail | function | No | Callback function for a failed call | |
| complete | function | No | Callback function for the call's completion (executed for both successful and failed calls) |
success Callback Function
Parameters
Object res
| Property | Type | Description |
|---|---|---|
| text | string | Clipboard data |
Sample Code
dlt.getClipboard({
success(res) {
console.log(res.text);
},
});