Added clipboard-api browser compatibility information
This commit is contained in:
parent
a6014cd4cd
commit
f0e03da63e
|
|
@ -915,6 +915,9 @@ const UI = {
|
||||||
* CLIPBOARD
|
* CLIPBOARD
|
||||||
* ------v------*/
|
* ------v------*/
|
||||||
|
|
||||||
|
// Read and write text to local clipboard is currently only supported in Chrome 66+ and Opera53+
|
||||||
|
// further information at https://developer.mozilla.org/en-US/docs/Web/API/Clipboard
|
||||||
|
|
||||||
writeLocalClipboard(text) {
|
writeLocalClipboard(text) {
|
||||||
if (typeof navigator.clipboard !== "undefined" && typeof navigator.clipboard.writeText !== "undefined") {
|
if (typeof navigator.clipboard !== "undefined" && typeof navigator.clipboard.writeText !== "undefined") {
|
||||||
navigator.clipboard.writeText(text).then(() => {
|
navigator.clipboard.writeText(text).then(() => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue