This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

ค้นหาฝ่ายสนับสนุน

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

เรียนรู้เพิ่มเติม

netscape.security.PrivilegeManager is coming undefined?

  • 6 การตอบกลับ
  • 1 คนมีปัญหานี้
  • 18 ครั้งที่ดู
  • ตอบกลับล่าสุดโดย kapilgoyal07

more options

Hi,


netscape.security.PrivilegeManager is coming undefined in mozilla firefox but in internet explorer or chrome its working fine.i am using 60.6.1 esr version. can you please give me any solution.i also tried to remove extension but that solution not working for me.

Thanks

Hi, netscape.security.PrivilegeManager is coming undefined in mozilla firefox but in internet explorer or chrome its working fine.i am using 60.6.1 esr version. can you please give me any solution.i also tried to remove extension but that solution not working for me. Thanks

วิธีแก้ปัญหาที่เลือก

Thanks every one.my issue has been solved with different way.

อ่านคำตอบนี้ในบริบท 👍 0

การตอบกลับทั้งหมด (6)

more options

hello, could you please provide more context to your question, like what are you attempting to do when the error is opening up...?

more options

Are you the developer? It is undefined because you cannot use it. Why do you need to use it?

more options

Hi,

We have a application which works only in internet explorer 8 and now working in IE-11 with compatibility mode. we want to make this application running in firefox.the functionality where we use netscape.security.PrivilegeManager is to copy link to clipboard.

following code is written currently :


      netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
  
  var clip = Components.classes['@mozilla.org/widget/clipboard;1'].createInstance(Components.interfaces.nsIClipboard);
  if (!clip) return;
  var trans = Components.classes['@mozilla.org/widget/transferable;1'].createInstance(Components.interfaces.nsITransferable);
  if (!trans) return;
  
  trans.addDataFlavor('text/unicode');
  
  var str = new Object();
  var len = new Object();
  
  var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);
  
  var copytext=urlToCopied;
  
  str.data=copytext;
  
  trans.setTransferData("text/unicode",str,copytext.length*2);
  
  var clipid=Components.interfaces.nsIClipboard;
  
  if (!clip) return false;
  
  clip.setData(trans,null,clipid.kGlobalClipboard);
  
  }

alert("Following URL was copied to your clipboard:\n\n" + urlToCopied);


Could you please help us for any suggestion.


Thanks

more options

เปลี่ยนแปลงโดย TyDraniu เมื่อ

more options

It's just text? For a contemporary code example, see:

https://hackernoon.com/copying-text-to-clipboard-with-javascript-df4d4988697f

more options

วิธีแก้ปัญหาที่เลือก

Thanks every one.my issue has been solved with different way.