内容文書

contentDocument IDL属性 (DOM)

[15] iframe 要素contentDocument IDL属性は、フレーム内の文書 (Document) を返します。

仕様書

取得器

[8] HTMLIFrameElement インターフェイスHTMLObjectElement インターフェイスHTMLFrameElement インターフェイスcontentDocument IDL属性取得器は、 次のようにしなければなりません >>7, >>13, >>14

  1. [22] 文脈オブジェクト内容文書を返します。

[23] 閲覧文脈包含子要素内容文書 (content document) は、 次のものです >>24

  1. [9]
    ... のいずれかの場合、
    1. [12] null を返します。
  2. [20] それ以外なら、
    1. [11] 要素入れ子閲覧文脈活性文書を返します。

[16] 文書中にない場合や、プラグイン等を表す object 要素は、 contentDocumentnull になります。

[17] フレームの内外で起源が異なる時も、 contentDocumentnull になります。

関連

[18] contentWindowgetSVGDocument も参照。

歴史

[1] Compound Document by Reference Framework 1.0 ( ( 版)) <http://www.w3.org/TR/CDR/#parent-to-child-dom-access>

[2] HTML Standard ( ( 版)) <http://www.whatwg.org/specs/web-apps/current-work/#dom-iframe-contentdocument>

[3] Web Applications 1.0 r8272 Change iframe, frame, and object.contentDocument to return null when cross-origin documents are involved. ( ( 版)) <http://html5.org/tools/web-apps-tracker?from=8271&to=8272>

[4] 829872 – Consider returning null from contentDocument getters when the caller does not subsume the document ( ( 版)) <https://bugzilla.mozilla.org/show_bug.cgi?id=829872>

[5] 422025 – iframe.contentDocument should use XOW (was: iframe.contentDocument should be restricted like window.document) ( ( 版)) <https://bugzilla.mozilla.org/show_bug.cgi?id=422025>

[6] Merge effective script origin into origin · whatwg/html@8a843f2 ( 版) <https://github.com/whatwg/html/commit/8a843f2169a6864a3024c4329528dccb2051d275>

[21] Define contentDocument using a more clearly defined shared concept ( (Ms2ger著, )) <https://github.com/whatwg/html/commit/ea2f021c265bd082415f2775fc7a1c562ec7275a>

[25] Use current settings object in content document definition (domenic著, ) <https://github.com/whatwg/html/commit/a6a1b714d2b3288fbf88528ac9182f9263b92bc8>