Share this page 

Write "other-browser-friendly" code when using the Netscape Capabilities package (this howto is deprecated)Tag(s): DEPRECATED


Use a combination of try/catch when enabling a privilege.
try {
  try {
     netscape.security.PrivilegeManager.enablePrivilege
          ("UniversalTopLevelWindow");
     } 
  catch(netscape.security.ForbiddenTargetException e) {
     }
  } 
catch(NoSuchMethodError e) {
  /* 
  ** add here code required by IE or 
  ** any other supported browser 
  */
}