nsIAboutModule 编辑

netwerk/protocol/about/nsIAboutModule.idlScriptable This interface is implemented to add an 'about:' page.  The contract id ends with a parameter that corresponds to the name of the about page. Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)

Method overview

unsigned long getURIFlags(in nsIURI aURI);
nsIChannel newChannel(in nsIURI aURI);

Constants

ConstantValueDescription
URI_SAFE_FOR_UNTRUSTED_CONTENT(1 << 0)A flag that indicates whether a URI is safe for untrusted content. If it is, web pages and so forth will be allowed to link to this about: URI. Otherwise, only chrome will be able to link to it.
ALLOW_SCRIPT(1 << 1)A flag that indicates whether script should be enabled for the given about: URI even if it's disabled in general.
HIDE_FROM_ABOUTABOUT(1 << 2)A flag that indicates whether this about: URI doesn't want to be listed in about:about, especially if it's not useful without a query string.

Methods

getURIFlags()

A method to get the flags that apply to a given about: URI. The URI passed in is guaranteed to be one of the URIs that this module registered to deal with.

unsigned long getURIFlags(
  in nsIURI aURI
);
Parameters
aURI
 
Return value

 A combination of the flags above corresponding to the appropriate flags for this about URI.

newChannel()

Constructs a new channel for the about protocol module.

nsIChannel newChannel(
  in nsIURI aURI
);
Parameters
aURI
The uri of the new channel.
Return value

A fully constructed channel that will load the about URI.

See Also

On this page is seen how to make a custom about page. The section "Firefox 4 (Second Approach)" provides copy paste code for working example. Click here to view article.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:122 次

字数:3659

最后编辑:6 年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文