📜  js 获取复制的文本 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:08.303000             🧑  作者: Mango

代码示例2
navigator.permissions.query({name: "clipboard-write"}).then(result => {
  if (result.state == "granted" || result.state == "prompt") {
    /* write to the clipboard now */
  }
});