iframe srcdoc文書

iframe 要素 srcdoc 属性 (HTML)

[10] iframe 要素srcdoc 属性は、 iframe 内にレンダリングする文書を埋め込むための属性です。 src 属性data: URL を使って HTML文書を埋め込むのと似ていますが、 構文的に srcdoc 属性の方が単純ですし、より使いやすいような規定が色々あります。

仕様書

意味

[18] iframe 要素srcdoc 属性は、 要素入れ子閲覧文脈含む (contain) ページの内容を指定するものです。 >>17

[22] srcdoc 属性src 属性の両方がある場合、 srcdoc 属性が優先されます。 src 属性は古い Webブラウザーのためのフォールバックとして使うことができます。

IDL 属性

[24] HTMLIFrameElement インターフェイスsrcdoc IDL属性は、 DOMString の読み書き可能な属性であり、 srcdoc 内容属性反映します。 >>17

iframe srcdoc 文書

[19] srcdoc 属性を解釈することによって生じる文書のことを、 iframe srcdoc文書 (iframe srcdoc document) といいます。

[12] iframe srcdoc文書文書の番地には、 about:srcdoc という特別な URL が使われます >>11

[25] iframe srcdoc文書起源実効スクリプト起源は、 外側の文書のもののエイリアスとなります。

[20] HTML文書でもXML文書でも、 iframe srcdoc文書HTML文書でなければなりません>>17

[35] ですから、 iframe srcdoc文書かつ XML文書である文書は存在しません。

[21] DOCTYPE は省略できます >>17iframe srcdoc文書DOCTYPE の有無や内容によらず、無奇癖モードとなります >>26

[32] ただし、 DOCTYPE を記述する場合には、 構文的に正しいものでなければいけません。構文解析器は、 構文的に正しくない DOCTYPE に対して構文解析エラーを報告しなければなりません。
  1. *
    1. |
      1. 注釈
      2. 空白
  2. ?
    1. DOCTYPE
  3. *
    1. |
      1. 注釈
      2. 空白
  4. html
  5. *
    1. |
      1. 注釈
      2. 空白

[16] iframe srcdoc文書には文字符号化宣言を含めることができません。 (iframe srcdoc文書文字符号化されたバイト列ではなく、 DOM 上に出現する文字列だからです。)

[13] iframe srcdoc文書フォールバック基底URLは、 外側の文書文書基底URLです。ひいては base 要素がない iframe srcdoc文書文書基底URLも、外側の文書文書基底URL となります。 >>11

[15] iframe srcdoc文書では、 title 要素を省略できます。

[23] iframe srcdoc文書には seamless 属性の効果が適用されます。

処理

[27] srcdoc 属性が設定、変更、削除されると、 iframe 要素の処理が行われ、入れ子閲覧文脈srcdocsrc に基づき navigate されます。

iframe を参照。

[33] 再読込も同様です。

location.reload を参照。

関連

[14] srcdoc 属性翻訳可能属性です。

歴史

[1] (X)HTML5 Tracking ( 版) http://html5.org/tools/web-apps-tracker?from=4618&to=4619

[2] IRC logs: freenode / #whatwg / 20100120 ( 版) http://krijnhoetmer.nl/irc-logs/whatwg/20100120

[3] IRC logs: freenode / #whatwg / 20100121 ( 版) http://krijnhoetmer.nl/irc-logs/whatwg/20100121#l-557

[4] IRC logs: freenode / #whatwg / 20100122 ( 版) http://krijnhoetmer.nl/irc-logs/whatwg/20100122#l-220

[5] IRC logs: freenode / #whatwg / 20100130 ( 版) http://krijnhoetmer.nl/irc-logs/whatwg/20100130#l-301

[6] IRC logs: freenode / #whatwg / 20100820 ( ( 版)) http://krijnhoetmer.nl/irc-logs/whatwg/20100820#l-134

[7] [whatwg] srcdoc="" feedback ( ( 版)) http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2010-November/029033.html

[8] [whatwg] <iframe srcdoc> and Content-Security-Policy ( ( 版)) http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2012-May/035707.html

[9] Web Applications 1.0 r7960 make srcdoc docs always be in standards mode ( ( 版)) http://html5.org/tools/web-apps-tracker?from=7959&to=7960

[28] (X)HTML5 Tracking ( 版) http://html5.org/tools/web-apps-tracker?from=4618&to=4619

[29] IRC logs: freenode / #whatwg / 20100810 ( 版) http://krijnhoetmer.nl/irc-logs/whatwg/20100810#l-144

[30] Web Applications 1.0 r5679 Make about:srcdoc documents have better defined handling for base URL, Referer headers, and location.reload(). ( ( 版)) http://html5.org/tools/web-apps-tracker?from=5678&to=5679

[31] REFERRER: srcdoc documents. · 65f9389 · w3c/webappsec ( ( 版)) https://github.com/w3c/webappsec/commit/65f9389edfce6d91bdda3a3cca3bf1b63bc53c5c

[34] Align srcdoc author requirements with its processing model · whatwg/html@36b055e ( 版) https://github.com/whatwg/html/commit/36b055e430dd4e5c0e154fa557764c91fc8b59fe

[36] Integrate Fetch into HTML · whatwg/html@7c5555a ( 版) https://github.com/whatwg/html/commit/7c5555a16f2920c02244c10756bb2f1a11e87a22

[37] Actually skip srcdoc documents. For #5. · w3c/webappsec-secure-contexts@834f9f4 ( 版) https://github.com/w3c/webappsec-secure-contexts/commit/834f9f4d0202ef890fcaa26bb04f8205454a3b80

[38] Editorial: synchronize with the DOM Standard · whatwg/html@21c6ec7 ( 版) https://github.com/whatwg/html/commit/21c6ec77594eb89b836d4872222f5916910967fd

[39] Integrate with the Referrer Policy spec, part 2 of n ( (domenic著, )) https://github.com/whatwg/html/commit/176e74243c649b709b9959b7d08b327290c2f403

[40] Integrate with HTML, part 2 of n (#49) ( (domenic著, )) https://github.com/w3c/webappsec-referrer-policy/commit/df68c16003b7f89bbaafe44d8756720889f9d64a

[41] スマートフォンでアプリを開くとabout:srcdocというページにすぐ... - Yahoo!知恵袋 ( ()) http://detail.chiebukuro.yahoo.co.jp/qa/question_detail/q12136418592

スマートフォンでアプリを開くとabout:srcdocというページにすぐに切り替わってしまいます。特定のアプリだけかとおもったら幾つかのアプリが同じような症状が出てくるようになりました。

[42] 価格.com - 『about:srcdocという真っ白なページについて』 LGエレクトロニクス Optimus it L-05E docomo のクチコミ掲示板 ( ()) http://bbs.kakaku.com/bbs/J0000008237/SortID=18075377/

アプリはいくつかあるのですが、WomanLogと言うアプリが一番酷いです。

このアプリを開くと、一瞬アプリ画面が出てからすぐにabout:srcdocのページになります。

about:srcdocのページを消すと広告か出て、またabout:srcdocのページ...の繰り返しです。

ポップアップブロックの設定はしています。

全機種だとabout:srcdocのページには飛ばないで広告だけ出てきて、広告を消すとアプリ画面に戻ります。

[43] i have recently had a pop up keep coming up whe... | Communities ( ()) https://discussions.apple.com/thread/5896292?tstart=0

I have had a pop up on my computer when i am on the internet using chrome and it says:

 

Adobe Flash Player has stopped a potentially unsafe operation.

 

 

The following local application on your computer or network:

 

 

about:srcdoc

 

 

is trying to communicate with this Internet-enabled location:

 

 

ds.serving-sys.com

[44] 802895 – implement <iframe srcdoc=> to allow document content in iframe to be specified inline]] ( ()) https://bugzilla.mozilla.org/show_bug.cgi?id=802895

[45] Set referrer policy better for <iframe srcdoc> documents (domenic著, ) https://github.com/whatwg/html/commit/5d7c532fc9aa275bd3b12d469b9841c0bad4f50d

[46] Honor srcdoc document referrer policies when set (estark37著, ) https://github.com/whatwg/html/commit/3147414111d134ecd844d9796aa6fc7c1979c98b

[47]

data:text/html,%3Cp%3E%3C/p%3E%3Ciframe srcdoc=&%23xfeff;&%23xfeff;345 onload="previousElementSibling.textContent=contentDocument.documentElement.textContent.length"%3E

Chrome では4と表示されます。つまり先頭の U+FEFF が1つだけ BOM と認識されて削除されます。

[48] Improve note on escaped characters in iframes srcdoc (earnubs著, ) https://github.com/whatwg/html/commit/b5c6eed3e5a7ac6172d1117765b4cde87edd2995

[49] Improve the note on characters that need to be escaped in iframes' srcdoc · Issue #1429 · whatwg/html () https://github.com/whatwg/html/issues/1429

[50] Improve note on escaped characters in iframes srcdoc by earnubs · Pull Request #3550 · whatwg/html () https://github.com/whatwg/html/pull/3550

[51] Clone <iframe srcdoc>'s node document's CSP list (annevk著, ) https://github.com/whatwg/html/commit/ebf6d404858bd3d75ec29b4899866935a74c6dc6

[52] What does it mean to alias a policy from a CSP list? · Issue #207 · w3c/webappsec-csp () https://github.com/w3c/webappsec-csp/issues/207

[53] Is srcdoc aliasing its parent's CSP or copying it? · Issue #2594 · whatwg/html () https://github.com/whatwg/html/issues/2594

[54] Clone <iframe srcdoc>'s node document's CSP list by annevk · Pull Request #4083 · whatwg/html () https://github.com/whatwg/html/pull/4083

[55] Handle a null request in init document csp algorithm (#372) (andypaicu著, ) https://github.com/w3c/webappsec-csp/commit/b294bec3b1cb4d48feb616a80cc988dff9b6da83

[56] Editorial: nested browsing context is a member, not a type (annevk, , ) https://github.com/whatwg/html/commit/6b737bbc428facf34ec3728c0912cf9e172d0ea4