aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/api/window/controllers/index.html
blob: 1dc286147a02d4ac1cf06b9622ebba244b5a1d9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---
title: window.controllers
slug: Web/API/Window/controllers
tags:
  - DOM
  - Gecko
  - 要更新
translation_of: Web/API/Window/controllers
---
<div>{{ApiRef}}</div>

<h2 id="Summary" name="Summary">概要</h2>

<p>Returns the XUL controllers of the chrome window.</p>

<h2 id="Syntax" name="Syntax">構文</h2>

<pre class="syntaxbox"><var>controllers</var> = window.controllers
</pre>

<ul>
 <li><code>controllers</code> is an object of type <a href="/ja/docs/XULControllers"><code>XULControllers</code></a> (<a href="/ja/docs/XPCOM_Interface_Reference/nsIControllers"><code>nsIControllers</code></a>).</li>
</ul>

<h2 id="Specification" name="Specification">仕様</h2>

<p>XUL-specific. Not part of specification.</p>

<div class="note">
<p>By default, a window's controller contains the code that supports the global window commands.</p>

<p>Chrome code can add controllers (to be used in conjunction with the goDoCommand and goUpdateCommand functions in globalOverlay.js).</p>

<p>However, the added controllers must be explicitly removed when the window is unloaded, as this is not done automatically.</p>

<p>Each missing removal can cause</p>
<a class="link-https" href="https://bugzilla.mozilla.org/show_bug.cgi?id=415775">bug 415775</a>:

<pre class="bz_comment_text" id="comment_text_0">ASSERTION: XPConnect is being called on a scope without a 'Components' property!</pre>
</div>

<p> </p>