嗨,我必须创建.write,使用 XPCom 在 javascript 中读取本地文件。为此,我在 javascript 的开头包含了以下行。
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
但是当上面的脚本执行时,会出现一个对话框说
**Internet security**
A script from "file://" is requesting enhanced abilities
that are UNSAFE and could be used to compromise your machine or data:
Run or install software on your machine
Allow these abilities only if you trust this source
to be free of viruses or malicious programs.
______ _______
| Deny | | Allow |
-------- ---------
但我不希望出现对话框。我怎样才能避免它?谢谢。