标签:get window security 浏览器 cap widget man idg service
if (window.clipboardData) {
window.clipboardData.setData("Text", text);
} else {
unsafeWindow.netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
const clipboardHelper = Components.classes["@mozilla.org/widget/clipboardhelper;1"].getService(Components.interfaces.nsIClipboardHelper);
clipboardHelper.copyString(text);
}
标签:get window security 浏览器 cap widget man idg service
原文地址:https://www.cnblogs.com/lymconch/p/11312288.html