Issue
I have this code for paste:
navigator.clipboard.readText().then(
clipText => document.querySelector("#Note").innerText += clipText);
But It has this error:
Uncaught TypeError: navigator.clipboard.readText is not a function
help me to solve this bug
Solution
I'm guessing you are testing it in Firefox, in that case:
Firefox only supports reading the clipboard in browser extensions, using the "clipboardRead" extension permission.
https://developer.mozilla.org/en-US/docs/Web/API/Clipboard/readText#browser_compatibility
Answered By - vanowm
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.