- Source:
Methods
(static) copyText(text) → {Promise}
- Description:
Copy text to clipboard
- This uses the outdated/deprecated "execCommand" for non https environments if window.navigator.clipboard is unavailable
- Source:
Parameters:
Name | Type | Description |
---|---|---|
text |
String | Text to copy to clipboard |
Returns:
A promise that will resolve once copy is successful or fails
- Type
- Promise
(inner) copyTextExecCommand(text)
- Description:
Copy text with the old (now deprecated execCommand)
- This is used as a fallback in copyTextToClipboard for non https environments
- Do not use in modern sites, not recommended
- Source:
Parameters:
Name | Type | Description |
---|---|---|
text |
String | Text to copy to clipboard |