The only option is to include that block of code into each of my functions?
问题 Several of my functions require the UniversalXPConnect privilege to be enabled. netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); So, my functions look like this: function oneOfMyFunctions() { netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); // ... } Actually, I also try to catch the exception when the privilege is denied. Looks as follows: try { netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); // ... } catch (e) { // .