From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/zh-cn/web/api/window/controllers/index.html | 45 +++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 files/zh-cn/web/api/window/controllers/index.html (limited to 'files/zh-cn/web/api/window/controllers') diff --git a/files/zh-cn/web/api/window/controllers/index.html b/files/zh-cn/web/api/window/controllers/index.html new file mode 100644 index 0000000000..972c1fd452 --- /dev/null +++ b/files/zh-cn/web/api/window/controllers/index.html @@ -0,0 +1,45 @@ +--- +title: Window.controllers +slug: Web/API/Window/controllers +tags: + - API + - HTML DOM + - NeedsCompatTable + - NeedsExample + - NeedsMarkupWork + - XUL + - 参考 + - 属性 + - 窗口 + - 非标准 +translation_of: Web/API/Window/controllers +--- +
{{APIRef}}{{non-standard_header}}
+ +

{{domxref("Window")}} 接口的 controllers 属性返回 chorme 窗口的 XUL 控制器。

+ +

语法

+ +
controllers = window.controllers
+
+ + + +

规范

+ +

XUL-专有属性,不属于任何规范。

+ +
+

默认情况下,窗口的控制器包含支持全局窗口命令的代码。

+ +

chrome 代码可以添加控制器(与 globalOverlay.js 中的 goDoCommandgoUpdateCommand 函数配合使用)。

+ +

然而,浏览器窗口被关闭时,我们必须手动删除这些添加的控制器,因为浏览器并不会自动完成这些操作。

+ +

如果有忘记删除的控制器,则会导致错误:

+bug 415775: + +
ASSERTION: XPConnect is being called on a scope without a 'Components' property!
+
-- cgit v1.2.3-54-g00ecf