[11] [CODE(HTMLe)@en[iframe]] [[要素]]の
[DFN[[CODE(DOMa)@en[contentWindow]]]]
[[IDL属性]]は、[[フレーム]]内の[[窓]]オブジェクトを返します。

* 仕様書

[REFS[
- [4] [CITE@en-GB-x-hixie[HTML Standard]] ([TIME[2016-03-31 07:16:44 +09:00]] 版) <https://html.spec.whatwg.org/#dom-iframe-contentwindow>
- [9] [CITE@en-GB-x-hixie[HTML Standard]] ([TIME[2016-03-31 07:16:44 +09:00]] 版) <https://html.spec.whatwg.org/#dom-object-contentwindow>
- [10] [CITE@en-GB-x-hixie[HTML Standard]] ([TIME[2016-03-31 07:16:44 +09:00]] 版) <https://html.spec.whatwg.org/#dom-frame-contentwindow>
]REFS]

* 取得器

[5] [CODE(DOMi)@en[HTMLIFrameElement]] [[インターフェイス]]、
[CODE(DOMi)@en[HTMLObjectElement]] [[インターフェイス]]、
[CODE(DOMi)@en[HTMLFrameElement]] [[インターフェイス]]の
[CODE(DOMa)@en[contentWindow]] [[IDL属性]]の[[取得器]]は、
次のようにしなければ[MUST[なりません]] [SRC[>>4, >>9, >>10]]。
[FIG(steps)[
= [6] [[文脈オブジェクト]]の[F[入れ子閲覧文脈]]が [CODE[null]] でなければ、
== [7] [[文脈オブジェクト]]の[F[入れ子閲覧文脈]]の [F[[CODE(DOMi)@en[WindowProxy]]]]
を返します。
= [15] それ以外なら、
== [8] [CODE[null]] を返します。
]FIG]

* 関連

[12] 似たものに [CODE(DOMa)@en[contentDocument]] があります。
[CODE(JS)@en[[[contentWindow]].[[document]]]] に相当します。

[13] 逆方向のものに [CODE(DOMa)@en[frameElement]] があります。

* 歴史

[1] [CITE@en[Web Applications 1.0 r5316     frame.contentWindowFixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=10116]]
([TIME[2010-08-21 04:26:00 +09:00]] 版)
<http://html5.org/tools/web-apps-tracker?from=5315&to=5316>

[2] [CITE@en-US[Window Object 1.0]]
([TIME[2006-04-08 02:19:28 +09:00]] 版)
<http://www.w3.org/TR/Window/#embeddingelt>

[3] [CITE@en-US[Window Object 1.0]]
([TIME[2006-04-08 02:19:28 +09:00]] 版)
<http://www.w3.org/TR/Window/#embeddingelt>

[14] [CITE@en[Be more precise about nested and discarded browsing contexts]]
([[domenic]]著, [TIME[2016-07-20 22:58:49 +09:00]])
<https://github.com/whatwg/html/commit/39118df640ad4a3f03f164fb5ffe0a56316297be>