Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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