nsIXULBrowserWindow 编辑
xpfe/appshell/public/nsIXULBrowserWindow.idl
Scriptable Provides methods that may be called from the internals of the browser area to tell the containing XUL window to update its user interface. Inherits from: nsISupports
Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)The XULBrowserWindow
attribute exists on the nsIXULWindow
interface although both Firefox and SeaMonkey also store their nsIXULBrowserWindow
reference in the global XULBrowserWindow
object accessible from JavaScript code.
XULBrowserWindow
object offered to JavaScript code provides a great many more methods and attributes than those listed here, which are only the ones available to C++ code. See the documentation for XULBrowserWindow
for details.Method overview
AString onBeforeLinkTraversal(in AString originalTarget, in nsIURI linkURI, in nsIDOMNode linkNode, in PRBool isAppTab); |
void setJSDefaultStatus(in AString status); |
void setJSStatus(in AString status); |
void setOverLink(in AString link, in nsIDOMElement element); |
Methods
onBeforeLinkTraversal()
Called before traversing a link to determine the appropriate target into which to load the link. This may be used, for example, to redirect links into new tabs or windows when it's not desirable to replace the content in the current tab (such as when the link is clicked in an app tab).
AString onBeforeLinkTraversal( in AString originalTarget, in nsIURI linkURI, in nsIDOMNode linkNode, in PRBool isAppTab );
Parameters
originalTarget
- The specified target for the link.
linkURI
- The URI of the link that is about to be traversed.
linkNode
- The
nsIDOMNode
representing the DOM node in which the link is located. isAppTab
- Whether or not the link being clicked is in an app tab.
Return value
A string indicating the revised target for the link.
setJSDefaultStatus()
Sets the default status according to JavaScript's version of the default status.
void setJSDefaultStatus( in AString status );
Parameters
status
- The status string.
setJSStatus()
Sets the status according to JavaScript's version of the status.
void setJSStatus( in AString status );
Parameters
status
- The status string.
setOverLink()
Tells the object implementing this function what link we are currently over.
void setOverLink( in AString link, in nsIDOMElement element );
Parameters
link
- The link string.
element
- The currently targeted link element.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论