enable_privilege.html 511 B

12345678910111213141516171819202122
  1. <!DOCTYPE html>
  2. <html lang="en" dir="ltr">
  3. <head>
  4. <title>Test page for enablePrivilege</title>
  5. <script>
  6. function init() {
  7. var result = document.getElementById("result");
  8. try {
  9. netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
  10. result.textContent = "FAIL";
  11. }
  12. catch (ex) {
  13. result.textContent = "PASS";
  14. }
  15. }
  16. </script>
  17. </head>
  18. <body onload="init();">
  19. <p id="result"></p>
  20. </body>
  21. </html>