diff options
Diffstat (limited to 'files/ja/web/api/window/frameelement/index.html')
-rw-r--r-- | files/ja/web/api/window/frameelement/index.html | 112 |
1 files changed, 112 insertions, 0 deletions
diff --git a/files/ja/web/api/window/frameelement/index.html b/files/ja/web/api/window/frameelement/index.html new file mode 100644 index 0000000000..ab266fa993 --- /dev/null +++ b/files/ja/web/api/window/frameelement/index.html @@ -0,0 +1,112 @@ +--- +title: window.frameElement +slug: Web/API/Window/frameElement +tags: + - API + - DOM + - Gecko + - HTML DOM + - Window +translation_of: Web/API/Window/frameElement +--- +<div>{{ ApiRef }}</div> + +<p>({{HTMLElement("iframe")}} や {{HTMLElement("object")}} のような)ウィンドウが埋め込まれた要素を返します。要素がトップレベルであるか異なるスクリプト生成元をもつ文書に埋め込まれるかのいずれかの場合は、 <code>null</code> を返します。</p> + +<h2 id="構文">構文</h2> + +<pre class="syntaxbox"><var>frameEl</var> = window.frameElement; +</pre> + +<ul> + <li><code>frameEl</code> は、ウィンドウが埋め込まれた要素です。ウィンドウが別の文書に埋め込まれていない場合、または埋め込まれている文書が異なる生成元を持つ(例えば異なるドメインから設置されている)場合、これは <code>null</code> になります。</li> +</ul> + +<div class="note"> +<p>このプロパティの名前にもかかわらず、これは{{HTMLElement("object")}}、{{HTMLElement("iframe")}}、または <a href="https://developer.mozilla.org/ja/docs/Web/HTML/Element/embed"><embed></a>を含むすべての埋め込みポイント内に埋め込まれた文書の役に立ちます。</p> +</div> + +<h2 id="例">例</h2> + +<pre class="brush:js">var frameEl = window.frameElement; +// 埋め込みの場合、要素の URL が 'http://mozilla.org/' に変わります。 +if (frameEl) { + frameEl.src = 'http://mozilla.org/'; +} +</pre> + +<h2 id="仕様">仕様</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">仕様</th> + <th scope="col">状態</th> + <th scope="col">コメント</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{ SpecName('HTML WHATWG', '#dom-frameelement', 'Window.frameElement') }}</td> + <td>{{ Spec2('WebRTC 1.0') }}</td> + <td>初期の仕様</td> + </tr> + </tbody> +</table> + +<h2 id="ブラウザー互換性">ブラウザー互換性</h2> + +<div>{{CompatibilityTable}}</div> + +<div id="compat-desktop"> +<table class="compat-table"> + <tbody> + <tr> + <th>機能</th> + <th>Chrome</th> + <th>Firefox (Gecko)</th> + <th>Internet Explorer</th> + <th>Opera</th> + <th>Safari</th> + </tr> + <tr> + <td>基本サポート</td> + <td>4?</td> + <td>{{CompatGeckoDesktop("1")}}</td> + <td>5.5?</td> + <td>12.1?</td> + <td>4?</td> + </tr> + </tbody> +</table> +</div> + +<div id="compat-mobile"> +<table class="compat-table"> + <tbody> + <tr> + <th>機能</th> + <th>Android</th> + <th>Firefox Mobile (Gecko)</th> + <th>IE Mobile</th> + <th>Opera Mobile</th> + <th>Safari Mobile</th> + </tr> + <tr> + <td>基本サポート</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatGeckoDesktop("1")}}</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatUnknown}}</td> + </tr> + </tbody> +</table> +</div> + +<h2 id="関連項目">関連項目</h2> + +<ul> + <li>{{domxref("window.frames")}} は、現在のウィンドウの直接のサブフレームを一覧する、配列のようなオブジェクトを返します。</li> + <li>{{domxref("window.parent")}} は、子ウィンドウの<code>frameElement</code>を含むウィンドウである、親ウィンドウを返します。</li> +</ul> |