UniversalXPConnect permission error in firefox 17

3.4k Views Asked by At

I have a small web JS, that copy and inserts some form data to and from the iframe. But it doesn't work in Firefox 17. I'm using this code:

"netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");"

What could be wrong? Is there any workaround?

1

There are 1 best solutions below

2
On

It was removed from running on the web with Firefox 17

https://developer.mozilla.org/en-US/docs/Bypassing_Security_Restrictions_and_Signing_Code

Early versions of Firefox allowed web sites to segregate principals using signed scripts, and request extra permissions for scopes within signed scripts using a function called enablePrivelege. These feature was not used much (aside from abuse), and its complexity made performance improvements difficult. Signed script segregation was removed in bug 726125, the enablePrivilege prompt was removed in bug 750859, and enablePrivilege itself was nerfed in bug 757046.

EnablePrivilege is disabled in Firefox 15 and will be removed in Firefox 17.

Sites that require additional permissions should now ask Firefox users to install an extension, which can interact with non-privileged pages if needed.

And a discussion on making an extension: http://support.mozilla.org/en-US/questions/936845