nsIXULBrowserWindow 编辑

xpfe/appshell/public/nsIXULBrowserWindow.idlScriptable 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.

Note: The 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 技术交流群。

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

发布评论

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

词条统计

浏览:30 次

字数:4786

最后编辑:7年前

编辑次数:0 次

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