前端菜鳥在查一個firefox復制失敗但chrome復制正常的問題。定位到firefox執行document.execCommand('copy')返回false,而chrome返回true這里提到With the 'cut' or 'copy' command as argument, Document.execCommand()now works, but only within the context of user-initiated or privilegedcode我使用的是firefox 47看了代碼感覺execCommand('copy')不是用戶觸發的(我不確定,不了解多少js....)想問下privileged code是個什么東西……firefox中有開關能打開之類的么?謝謝。
firefox中document.execCommand('copy')無效
萬千封印
2018-09-20 11:05:59