3

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?

Droidik
  • 177
  • 4
  • 18

1 Answers1

7

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

epascarello
  • 204,599
  • 20
  • 195
  • 236
  • Why should I create an extension because of a small script on my page? It's a bit stupid. What about any other solution (copy form data from/to iframe form)? – Droidik Dec 20 '12 at 07:08
  • @PanInkognito I do not make the rules, ask Firefox why they did it. ;) I do not know what you are doing to give you a different solution. Your post lacks details. – epascarello Dec 20 '12 at 13:48