nsIAboutModule 编辑
netwerk/protocol/about/nsIAboutModule.idl
Scriptable 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
Constant | Value | Description |
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论