dlt.setClipboard
Introduction
Set clipboard data.
Note: This interface may involve privacy issues, so use it carefully.
Parameters
Object object
Property | Type | Default | Required | Description |
---|---|---|---|---|
text | string | Yes | Clipboard data | |
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) |
Sample Code
dlt.setClipboard({
text: 'hello world',
success(res) {
console.log('success: ', res);
},
});