Advertisement
Guest User

Untitled

a guest
May 25th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. handleCopy = () => {     navigator.permissions.query({name: "clipboard-write"}).then(result => {       if (result.state == "granted" || result.state == "prompt") {         navigator.clipboard.writeText(this.state.shareUrl).then(() => {           notification('success', 'Successfully copied')         }, function() {           notification('info', 'No permission to copy')         });       } else {         notification('info', 'No permission to copy')       }     });   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement