-
Notifications
You must be signed in to change notification settings - Fork 4
/
717.txt
516 lines (409 loc) · 26.1 KB
/
717.txt
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
[7] [[HTML]] の [DFN[[CODE(HTMLe)@en[[[iframe]]]]]] [[要素]]は、
[[入れ子閲覧文脈]]を[[表現]]します [SRC[>>51]]。
* 仕様書
[REFS[
- [51] '''[CITE@en-GB-x-hixie[HTML Standard]] ([TIME[2015-05-06 10:42:35 +09:00]] 版) <https://html.spec.whatwg.org/#the-iframe-element>'''
- [60] [CITE@en-GB-x-hixie[HTML Standard]] ([TIME[2015-05-06 10:42:35 +09:00]] 版) <https://html.spec.whatwg.org/#HTMLIFrameElement-partial>
]REFS]
* 構文
[55] [[HTML構文]]では、[[開始タグ]]も[[終了タグ]]も省略できません [SRC[>>51]]。
* 属性
[56] 次の[[属性]]があります。
[FIG(list short)[
- [[大域属性]]
- [CODE(HTMLa)@en[[[allowfullscreen]]]]
- [CODE(HTMLa)@en[[[height]]]]
- [CODE(HTMLa)@en[[[name]]]]
- [CODE(HTMLa)@en[[[sandbox]]]]
- [CODE(HTMLa)@en[[[seamless]]]]
- [CODE(HTMLa)@en[[[src]]]]
- [CODE(HTMLa)@en[[[srcdoc]]]]
- [CODE(HTMLa)@en[[[width]]]]
]FIG]
,[CODE(HTMLa)[[[align]]]] ,[CODE(SGML)[%[[IAlign]]]] , ,配置 ,[HTML 4] 非推奨
,[CODE(HTMLa)@en[[[allowcrossdomainxhr]]]],,,非標準,[[Air]]
,[CODE(HTMLa)[[[allowtransparency]]]] , , ,背景透明性 ,非標準
,[CODE(HTMLa)@en[[[application]]]],[CODE(HTML)@en[[[on]]]] | [CODE(HTMLe)@en[[[off]]]],,,非標準,[[HTA]]
,[CODE(HTMLa)[[[border]]]] , , ,境界線 ,非標準
,[CODE(HTMLa)[[[bordercolor]]]] ,[CODE(SGML)[%[[Color]]]] , ,境界線色 ,非標準
,[CODE(HTMLa)[[[class]]]] , ,(なし) ,級 ,[HTML 4] [CODE(SGML)[%[[coreattrs]]]]
,[CODE(HTMLa)[[[datafld]]]] , , ,データ欄 ,非標準
,[CODE(HTMLa)[[[datasrc]]]] ,[CODE(SGML)[%[[URI]]]] , ,データ源 ,非標準
,[CODE(HTMLa)@en[[[documentroot]]]],,,非標準,[[Air]]
,[CODE(HTMLa)[[[frameborder]]]] , ,[CODE(HTML)[1]] ,枠線 ,[HTML 4]
,[CODE(HTMLa)[[[hspace]]]] , , ,横余白 ,非標準
,[CODE(HTMLa)[[[id]]]] ,[CODE(SGML)[[[ID]]]] ,(なし) ,固有識別子 ,[HTML 4] [CODE(SGML)[%coreattrs]]
,[CODE(HTMLa)[[[longdesc]]]] ,[CODE(SGML)[%[[URI]]]] ,(なし) ,長い説明へのリンク ,[HTML 4]
,[CODE(HTMLa)[[[marginheight]]]] ,[CODE(SGML)[%[[Pixels]]]] , ,余白高さ ,[HTML 4]
,[CODE(HTMLa)[[[marginwidth]]]] ,[CODE(SGML)[%[[Pixels]]]] , ,余白幅 ,[HTML 4]
,[CODE(HTMLa)@en[[[ondominitialize]]]],,,非標準,[[Air]]
,[CODE(HTMLa)@en[[[sandboxroot]]]],,,非標準,[[Air]]
,[CODE(HTMLa)[[[scrolling]]]] , ,[CODE(HTML)[auto]] ,Scroll bar ,[HTML 4]
,[CODE(HTMLa)[[[security]]]] , , ,安全上の扱い ,非標準 ,[[WinIE]]
,[CODE(HTMLa)[[[style]]]] , ,(なし) ,スタイル指定 ,[HTML 4] [CODE(SGML)[%coreattrs]]
,[CODE(HTMLa)[[[title]]]] ,[CODE(SGML)[%[[Text]]]] ,(なし) ,注釈的題 ,[HTML 4] [CODE(SGML)[%coreattrs]]
,[CODE(HTMLa)@en[[[type]]]]
,[CODE(HTMLa)[[[vspace]]]] , , ,縦余白 ,非標準
,[CODE(XMLa)[[[xmlns]]]] ,[CODE(URI)[[[http://www.w3.org/1999/xhtml]]]] 固定 ,== ,[[名前空間名]] ,W3C 勧告 ,[[XHTML m12n]]
* 文脈
[53] [[埋め込み内容]]が使える場所で利用できます [SRC[>>51]]。
* 分類
[52] [CODE(HTMLe)@en[[[iframe]]]] [[要素]]は次の通り分類されています [SRC[>>51]]。
[FIG(short list)[
- [[フロー内容]]
- [[語句内容]]
- [[埋め込み内容]]
- [[対話的内容]]
- [[触知可能内容]]
]FIG]
* 内容
[9]
:[[内容模型]]:[CODE(SGML)[(%[[flow]])*]]
[11] [CODE(HTMLe)[iframe]] 要素の内容は、未対応 UA
や不使用設定の UA だけが表示するべきです [SRC[HTML 4 16.5]]。
* [CODE(DOMi)@en[HTMLIFrameElement]] インターフェイス
[57] [CODE(HTMLe)@en[[[iframe]]]] [[要素]]の[[要素インターフェイス]]は、
[DFN[[CODE(DOMi)@en[[[HTMLIFrameElement]]]]]] [[インターフェイス]]です [SRC[>>51]]。
[58] この[[インターフェイス]]は[[文書環境]]に[[晒され]]ています [SRC[>>51]]。
[59] [CODE(DOMi)@en[[[HTMLElement]]]] [[インターフェイス]]を[[継承]]する [SRC[>>51]] 他、
次の[[メンバー]]があります [SRC[>>51, >>60]]。
[FIG(list short)[
- [CODE(DOMa)@en[[[allowFullscreen]]]]
- [CODE(DOMa)@en[[[contentDocument]]]]
- [CODE(DOMa)@en[[[contentWindow]]]]
- [CODE(DOMm)@en[[[getSVGDocument]]]]
- [CODE(DOMa)@en[[[height]]]]
- [CODE(DOMa)@en[[[name]]]]
- [CODE(DOMa)@en[[[sandbox]]]]
- [CODE(DOMa)@en[[[seamless]]]]
- [CODE(DOMa)@en[[[src]]]]
- [CODE(DOMa)@en[[[srcdoc]]]]
- [CODE(DOMa)@en[[[width]]]]
- [CODE(DOMa)@en[[[align]]]]
- [CODE(DOMa)@en[[[frameBorder]]]]
- [CODE(DOMa)@en[[[longDesc]]]]
- [CODE(DOMa)@en[[[marginHeight]]]]
- [CODE(DOMa)@en[[[marginWidth]]]]
- [CODE(DOMa)@en[[[scrolling]]]]
]FIG]
[66] 次の状態を持ちます。
[FIG(list members)[
:[[入れ子閲覧文脈]]:[CODE(HTMLe)@en[[[iframe]]]] [[要素]]が[[表現]]する[[閲覧文脈]]です。
]FIG]
* 処理
[68] [[フレーム]]を参照。
[65] [CODE(HTMLe)@en[[[iframe]]]] [[要素]]の[[属性の追加]]/[[属性の設定]]/[[属性の変更]]/[[属性の削除]]は、次のようにしなければ[['''なりません''']] [SRC[>>51]]。
[FIG(steps)[
= [[入れ子閲覧文脈]]を持つなら、
== 対象が [CODE(HTMLa)@en[[[srcdoc]]]] [[属性]]か、
対象が [CODE(HTMLa)@en[[[src]]]] [[属性]]で[[要素]]に [CODE(HTMLa)@en[[[srcdoc]]]] [[属性]]がなければ、
=== [[[CODE(HTMLe)@en[iframe]]属性の処理]]を行います。
]FIG]
* レンダリング
[13] 行内フレームは大きさを変更できません。ですから [CODE(HTMLa)[[[noresize]]]]
属性はありません。 [SRC[HTML 4 16.5]]
[14] HTML 4 は >>13 としていますが、利用者の便を考えれば、
UA は寸法変更機能を設けた方が良いかもしれません。
* 安全性
[15] [[フレーム]]一般と同じく、外部文書を埋込み、 [[DOM]]
などで相互に操作できることによって生じ得る保安上の問題に注意が必要です。
多くの UA では、異なるドメインでのスクリプトによる access
を禁止するなどの措置をとっています。
(現状では十分ではないという指摘もありますし、
あまり制限しすぎると自由度が失われるという問題もあります。)
[1] 異なる[[ドメイン]]の参照は (大抵)
[[広告]]とかだし、ブラウザの設定で出来ないようにして欲しいなあ。
[2] >>1 それを言うなら [CODE(HTMLe)[iframe]] 自体こうこっく(以下略)
[19] [CODE(HTMLe)[[[img]]]] 要素などと同じように、
ごく小さな大きさを指定したり [[CSS]]
などにより非表示にしたりして閲覧者が気付かないうちに別の[[資源]]が読み込まれるように仕組むことができます。
[CODE(HTMLe)[[[img]]]] 要素の場合と同様に[[アクセス・カウンタ]]のような
(閲覧者にとって) 比較的無害な場合もあれば、
[[ブラクラ]]のような危険なものが埋め込まれる可能性もあります。
[[アクセス・カウンタ]]の類と一口に言っても、
単なる計数の場合もあれば、閲覧者の個人情報の収集を狙ったものである可能性もあり、
注意が必要なことには変わりありません。 >>18
の問題のように、外部のサイトに影響を与えさせることを狙った使用例もあります
(>>20)。
[20] 注意: 単純な [CODE(HTTP)[[[GET]]]]
アクセスによって鯖側の状態に大きく影響を与えてしまう
([[安全]]でない) のは [[REST]]
的に間違った実装であり、その外部サイトの側が [CODE(HTMLe)[[[iframe]]]]
で参照されるか否か以前の問題を抱えているとも言えます。
ただし >>18 のようなアクセス数を数えるという場合には必然的に
[CODE(HTTP)[[[GET]]]] でなければなりませんし、 [[REST]]
というか [[HTTP]] 的にも一応問題ないことになってはいるので、
難しい問題ではあります。
[26] '''実例: 2ch からランク付け対象サイトへのリンク'''
[CITE[2chにlivedoor秘書乙部Blogが埋め込まれている!]]
<http://blog.livedoor.jp/otobeorz/>
[[アクセス数]]によって順位付けされている日記サイトへの
[CODE(HTMLe)@en[[[iframe]]]] を使った[[リンク]]が、
日記の著者とは無関係の第三者である [[2ch]]
の [[Web頁]]に含まれていました。
[[2ch]] は膨大な[[アクセス]]のある[[掲示板]]サイトで、
これによって、当該日記の順位は急上昇しました。
[[2ch]] の[[管理者]]である[[ひろゆき]]は、
[[アクセス数]]の水増しのための不正があった場合に、
それが第三者によるものであってもその日記を削除するという日記システム管理者の方針が日記システム管理者の関係者であっても例外とされずに適用されるかを確かめたかったとしています。
この事例は、技術的には
- 無関係な [[Web頁]]を[[利用者]]が気づかないうちに読込ませられるという
[[Webブラウザ]]実装上の問題
- 本来[[冪等]]で[[安全]]な [CODE(HTTP)@en[[[GET]]]]
[[要求]]で自動順位付けすることの是非
社会的には
- [[アクセス数]]という表面的なもので順位付けしている愚かさ
- 悪意のある第三者によってシステム利用者が不利益を被り得る運用方法
への注意を喚起しています。
また、日記システム提供者の[[ライブドア]]は、
[CODE(HTMLe)@en[[[iframe]]]] により[[リンク]]に対して
[[JavaScript]] のコードによる[Q[報復]]を行っていますが、
やろうと思えばそれ以上にえげつないこともできました。
[22] '''実例: mixi による閲覧者の特定'''
- [23] [CITE[インターネット殺人事件 : 日記 : 2005-02]] <http://internet.kill.jp/d/200502.html#d14_t2>
- [24] [CITE[fladdict.net blog: MIXIを使った、トラフィックの個人追跡システム]]
<http://www.fladdict.net/blog-jp/archives/2005/12/mixi.php>
会員制で、ある会員 [VAR@em[X]] がある内部の頁 [VAR@en[P[SUB[M]]]]
を閲覧したことを、 [VAR@en[P[SUB[M]]]] の著者である別の会員
[VAR@en[Y]] が知り得る機能 ([Q[[[足跡]]]]) が存在するサービス
[[mixi]] を悪用することで、 [VAR@en[Y]] は外部の Web
頁 [VAR@en[Q]] を閲覧した [[mixi]] 会員の個人情報を入手し得ます。
機能を悪用する会員 [VAR@en[Y]] がよろしくないのは別として
[WEAK[(あるいは[Q[正当な利用]]だとの主張もできるかもしれませんがw)]]、
別の Web サイトに情報を送ることができる Web
ブラウザの実装にも、個人情報を半自動で [WEAK[(= 会員の意識しない間に)]]
記録する [[mixi]] のシステムにも問題があります。
;;
>>24 にコメントを書いている人が問題を軽視し過ぎなのが情けない。
* 知的財産権に関して
[21] 埋め込み型リンクと著作権等との関係については
[CODE(HTMLe)[[[frame]]]] の項をご覧下さい。
* 不思議解釈
[16] [Q[iframe]] は [Q[inline frame]] の略のようですから、
[Q[インライン・フレーム]]と読むのが適当でしょう。
省略形は省略形のまま読む派 (謎) なら [Q[アイ・フレーム]]
も許容範囲でしょう。
中には[Q[イフレーム]]と読む人もいます。違和感ありまくりですが、
[Q[アイ・フレーム]]が良くて[Q[イフレーム]]は悪いとする理由はなさそうですから、
まあ良いでしょう。
ところが、世間には[Q[イン・フレーム]]と読む人もいます。
確かに [Q[inline frame]] の省略としてあり得るものではありますが、
単なる[Q[イン]]と[Q[インライン]]では意味が随分違ってきます。
[Q[イン・フレーム]]と読むと[Q[フレームの中]]ととられても仕方がありません。
あるいは、頁の''中のフレーム''という意味と誤解していることからそう呼ぶのかもしれませんが、
もしそうだとしたら呆れるばかりです。
[Q[インナー・フレーム]]なる用例も発見しました。
確かに頁の内側にあることには違いありませんが・・・。
[17] 読み方のまとめ:
- ○ 行内フレーム
- ○ インライン・フレーム
- ○ アイ・フレーム
- × イフレーム
- × イン・フレーム
- × インナー・フレーム
[25] '''[CODE(HTMLe)@en[iframe]] の代替内容に [CODE(HTMLe)@en[frame]]!?'''
[[タグ講座]]の中には、
>
[PRE(HTML invalid example code)[
<iframe width=150 height=200 src="blahblah.html">
<frame src="blahblah.html">
</iframe>
]PRE]
のように[[代替内容]]として [CODE(HTMLe)@en[[[frame]]]]
[[要素]]を入れろとしているものがあるそうです。
;; 出典:
- [CITE[<IFRAME>との出会い、そして克服 : Hotwired]]
([[Zach Waller]] 著、1997年11月28日付け、日本語訳2005年12月現在)
<http://hotwired.goo.ne.jp/webmonkey/html/97/47/>
- [CITE@en[The IFrames Lowdown]]
([[Zach Waller]] 著、2001年4月10日付け、2005年12月現在)
<http://hotwired.lycos.com/webmonkey/96/37/index2a_page5.html?tw=authoring>
;;
この出典の[[タグ講座]]もなかなか低品質だw
低品質なのに駄目出しされる元の[[タグ講座]]はどれだけ劣悪なのかww
ちなみにこの出典の[[タグ講座]]の日本語訳は翻訳がひどくて何が言いたいのかさっぱりわからないww
[29]
[CITE[Safari Developer FAQ]] ([CODE[2006-12-31 11:40:00 +09:00]] 版) <http://developer.apple.com/jp/internet/safari/faq.html#anchor5>
> SafariのBack/Forwardキャッシュ(訪れた人がブラウザの「戻る」ボタンや「進む」ボタンを押した時点から蓄積されるキャッシュ)も、ページにフレームを含めることによって阻止することができます。フレームベースのページは、Back/Forwardキャッシュには保存されず、非フレームベースのページも下に示す不可視のiframeを追加することによって同じように動作します。
([[名無しさん]])
[32]
[Q[アイフレ]]と略す人もいるそうです。
* 歴史
[REFS[
- [8] [[HTML 4]]
-- 16.5 Inline frames: the [CODE(HTMLe)[IFRAME]] element
<IW:HTML4:"present/frames.html#idx-frame-7">
]REFS]
[54] [[HTML4]] では [CODE(SGML)@en[[[%inline;]]]] に分類されていました。
[3] そういえば昔、 [[WinIE 5]] の頃、 [CODE(HTMLe)[iframe]] 内に表示されている文書の [CODE(HTMLe)[[[title]]]] が
[[window]] の [[title bar]] に表示されるというバグ
[WEAK[([[M$]] は[[仕様]]だと言い張るかもしれんが。)]] がありましたね。
そのバグ、今でもあるのかなあ
[35] [[Firefox]] 3.0.4 で[[フィード]]の[[エントリー]]の中身 ([[Atom]]
の [CODE(XMLe)@en[atom:[[content]]]] [[要素]]の[[内容]]) に [CODE(HTMLe)@en[[[iframe]]]]
[[要素]]を含めると、[[フィード]]の中身の一覧で出てくる説明部分に
[CODE(XMLe)@en[[[iframe]]]] [[要素]]の[[内容]]のソースがそのまま出てきます。
どうも、[[スクリプト有効]]で[[構文解析]]した結果 [CODE(DOMi)@en[[[Text]]]]
[[節点]]になった[[内容]]をそのまま取ってきているみたいですね。
[4] まじれすすると、 [CODE(HTMLe)[iframe]] 要素型は[[非推奨]]なので [CODE(HTMLe)[[[object]]]] 要素型を使いましょう。
[5] >>4 または [[XHTML 2]] で [CODE(XHTMLa)[[[src]]]]
[[汎用属性]]という手もある。
[6] しかし[[イフレーム]]はないだろう・・・。
[18]
[[2ch]] から外部日記サイトへの [CODE(HTMLe)[[[iframe]]]]
による[[リンク]]の問題への言及における、[CODE(HTMLe)[[[iframe]]]]
によるリンクを指した表現:
- [Q[埋め込み]]: 結構多い。
- [Q[リンク]]: 結構多い。 2ch の一部のスレタイにも採用
(例: [CITE[【ネット】"なぜ?" 2ちゃんねるトップページに、ライブドア・乙部綾子ブログへの隠しリンク★4]])
- [Q[参照]]: ちらほら
参考:
<IW:Google:"2ch 乙部 iframe">
(現時点では日が浅いので結果は然程多くない。)
([[名無しさん]] [WEAK[2005-05-13 10:15:37 +00:00]])
[27]
[CITE[xkr.us / dom / Accessing the document inside an iframe]] <http://xkr.us/articles/dom/iframe-document/>
([[名無しさん]] [WEAK[2006-10-21 02:10:17 +00:00]])
[28]
[CITE[IFRAME を使わない方法の補足 | WWW WATCH]] <http://hyper-text.org/archives/2006/11/object_element.shtml>
([[名無しさん]] [WEAK[2006-11-26 09:56:01 +00:00]])
[30]
[CITE[Bug 80713 – Need a way to specify an auto-height for an IFRAME such that the frame is given the full height of the contained content]] ([CODE[2007-04-25 20:28:29 +09:00]] 版) <https://bugzilla.mozilla.org/show_bug.cgi?id=80713>
([[名無しさん]] [WEAK[2007-04-25 11:37:12 +00:00]])
[31]
[CITE[JavaScript インラインフレーム(iframe)関連 - とみぞーノート]] ([CODE[2007-05-10 21:44:39 +09:00]] 版) <http://wiki.bit-hive.com/tomizoo/pg/JavaScript%20%A5%A4%A5%F3%A5%E9%A5%A4%A5%F3%A5%D5%A5%EC%A1%BC%A5%E0(iframe)%B4%D8%CF%A2>
([[名無しさん]] [WEAK[2007-05-10 12:46:51 +00:00]])
[33]
[CITE[outsider reflex]] ([[Piro(SHIMODA Hiroshi)]] 著, [CODE[2008-03-01 12:23:54 +09:00]] 版) <http://piro.sakura.ne.jp/>
([CODE(MIME)@en[[[text/html]]]])
[PRE(HTML bad example code)[
<?xml version="1.0" encoding="Shift_JIS"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" [
<!ENTITY % XLINK.xmlns.attrib "xmlns:xhtml2 CDATA #FIXED 'http://www.w3.org/2002/06/xhtml2'">
<!ENTITY % Inline.extra "| xhtml2:l | iframe">
<!ENTITY % newInlineContents "(#PCDATA|br|span|em|strong|dfn|code|samp|kbd|var|cite|abbr|acronym|q|sub|sup|bdo|a|img|map|object|input|select|textarea|label|button|ruby|ins|del|script|noscript|xhtml2:l)*">
<!ENTITY % coreAttributes "
id ID #IMPLIED
class CDATA #IMPLIED
style CDATA #IMPLIED
title CDATA #IMPLIED">
<!ELEMENT xhtml2:l %newInlineContents;>
<!ATTLIST xhtml2:l %coreAttributes;>
<!ELEMENT iframe %newInlineContents;>
<!ATTLIST iframe
%coreAttributes;
longdesc CDATA #IMPLIED
src CDATA #IMPLIED
frameborder ( 1 | 0 ) '1'
marginwidth CDATA #IMPLIED
marginheight CDATA #IMPLIED
scrolling ( yes | no | auto ) 'auto'
height CDATA #IMPLIED
width CDATA #IMPLIED
>
]>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:xhtml2="http://www.w3.org/2002/06/xhtml2"
xml:lang="ja">
]PRE]
([[名無しさん]])
[34]
[CITE[The <iframe> element and sandboxing ideas]] ([[Ian Hickson <ian@...>]] 著, [TIME[2008-05-21 22:30:48 +09:00]] 版) <http://permalink.gmane.org/gmane.org.w3c.whatwg.discuss/14191>
[36] [CITE[iframe]]
([TIME[2009-10-18 15:51:31 +09:00]] 版)
<http://suika.fam.cx/~wakaba/-temp/test/html/iframe/remove-create-2.html>
[37] >>36 Firefox 3.5.3 は FAIL、 Opera と Chrome は PASS。
[38] [CITE['''['''whatwg''']''' Iframe dimensions]]
([TIME[2010-08-12 07:46:38 +09:00]] 版)
<http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2010-August/027832.html>
[39] [CITE['''['''whatwg''']''' Should events be paused on detached iframes?]]
([TIME[2012-02-08 09:55:26 +09:00]] 版)
<http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2012-February/034755.html>
[40] [CITE@en[Web Applications 1.0 r7139 Remove the 'magic iframe' feature.]]
( ([TIME[2012-06-23 05:54:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=7138&to=7139>
[41] [CITE[''''''[''''''whatwg'''''']'''''' The so-called 'magic iframe' feature]]
( ([TIME[2012-06-23 05:59:53 +09:00]] 版))
<http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2012-June/036469.html>
[42] [CITE[javascript - iframe without an src attribute - Stack Overflow]]
( ([TIME[2013-07-02 07:32:28 +09:00]] 版))
<http://stackoverflow.com/questions/4284605/iframe-without-an-src-attribute>
[43] [CITE@en[Web Applications 1.0 r8289 Handle the case of removing the 'src' attribute on a live <iframe>, and some minor clarity changes.]]
( ([TIME[2013-11-16 07:10:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=8288&to=8289>
[44] [CITE@en[Web Applications 1.0 r7406 Bit of editorial cleanup for <iframe>. Should have no normative effect.]]
( ([TIME[2012-09-26 12:27:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=7405&to=7406>
[45] [CITE@en[Web Applications 1.0 r3280 <iframe> content model.]]
( ([TIME[2009-06-17 04:14:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=3279&to=3280>
[46] [CITE@ja[iframe - XUL | MDN]]
( ([TIME[2013-11-14 08:19:45 +09:00]] 版))
<https://developer.mozilla.org/ja/docs/XUL/iframe>
[47] [CITE[''''''[''''''whatwg'''''']'''''' Avoiding synchronous iframe load]]
( ([TIME[2014-01-22 04:26:50 +09:00]] 版))
<http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2014-January/041898.html>
[48] [CITE@en[Web Applications 1.0 r8708 <iframe>s only do their nested browsing context stuff when they are themselves in a browsing context]]
( ([TIME[2014-08-06 04:31:00 +09:00]] 版))
<http://html5.org/r/8708>
[49] [CITE@en[''''''[''''''webappsec'''''']'''''' Rechartering: force secure-only child browsing contexts]]
( ([[Brad Hill]] 著, [TIME[2014-11-10 09:07:13 +09:00]] 版))
<http://lists.w3.org/Archives/Public/public-webappsec/2014Nov/0128.html>
[50] [CITE@en[''''''[''''''whatwg'''''']'''''' <iframe async>]]
([[Anne van Kesteren]] 著, [TIME[2015-02-27 16:57:47 +09:00]] 版)
<https://lists.w3.org/Archives/Public/public-whatwg-archive/2015Feb/0051.html>
[61]
,[CODE(DOMa)@en[[[align]]]],"[CODE(DOMi)@en[[[HTMLIFrameElement]]]] ([[Trident]])"
,[CODE(DOMa)@en[[[allowTransparency]]]],"[CODE(DOMi)@en[[[HTMLFrameBase2]]]] ([[Trident]])"
,[CODE(DOMa)@en[[[border]]]],"[CODE(DOMi)@en[[[HTMLFrameBase]]]] ([[Trident]])"
,[CODE(DOMa)@en[[[contentWindow]]]],"[CODE(DOMi)@en[[[HTMLFrameBase2]]]] ([[Trident]])"
,[CODE(DOMa)@en[[[frameBorder]]]],"[CODE(DOMi)@en[[[HTMLFrameBase]]]] ([[Trident]])"
,[CODE(DOMa)@en[[[frameSpacing]]]],"[CODE(DOMi)@en[[[HTMLFrameBase]]]] ([[Trident]])"
,[CODE(DOMa)@en[[[height]]]],"[CODE(DOMi)@en[[[HTMLIFrameElement2]]]] ([[Trident]])"
,[CODE(DOMa)@en[[[hspace]]]],"[CODE(DOMi)@en[[[HTMLIFrameElement]]]] ([[Trident]])"
,[CODE(DOMa)@en[[[longDesc]]]],"[CODE(DOMi)@en[[[HTMLFrameBase3]]]] ([[Trident]])"
,[CODE(DOMa)@en[[[marginHeight]]]],"[CODE(DOMi)@en[[[HTMLFrameBase]]]] ([[Trident]])"
,[CODE(DOMa)@en[[[marginWidth]]]],"[CODE(DOMi)@en[[[HTMLFrameBase]]]] ([[Trident]])"
,[CODE(DOMa)@en[[[name]]]],"[CODE(DOMi)@en[[[HTMLFrameBase]]]] ([[Trident]])"
,[CODE(DOMa)@en[[[noResize]]]],"[CODE(DOMi)@en[[[HTMLFrameBase]]]] ([[Trident]])"
,[CODE(DOMa)@en[[[onload]]]],"[CODE(DOMi)@en[[[HTMLFrameBase2]]]] ([[Trident]])"
,[CODE(DOMa)@en[[[onreadystatechange]]]],"[CODE(DOMi)@en[[[HTMLFrameBase2]]]] ([[Trident]])"
,[CODE(DOMa)@en[[[readyState]]]],"[CODE(DOMi)@en[[[HTMLFrameBase2]]]] ([[Trident]])"
,[CODE(DOMa)@en[[[scrolling]]]],"[CODE(DOMi)@en[[[HTMLFrameBase]]]] ([[Trident]])"
,[CODE(DOMa)@en[[[src]]]],"[CODE(DOMi)@en[[[HTMLFrameBase]]]] ([[Trident]])"
,[CODE(DOMa)@en[[[vspace]]]],"[CODE(DOMi)@en[[[HTMLIFrameElement]]]] ([[Trident]])"
,[CODE(DOMa)@en[[[width]]]],"[CODE(DOMi)@en[[[HTMLIFrameElement2]]]] ([[Trident]])"
* 例
[10] 単純な埋め込み例 [SRC[HTML 4 16.5]]
[PRE(HTML)[
<IFRAME src="foo.html" width="400" height="500"
scrolling="auto" frameborder="1">
[Your user agent does not support frames or is currently configured
not to display frames. However, you may visit
<A href="foo.html">the related document.</A>]
</IFRAME>
]PRE]
この例では、対応している UA は文章中に [SAMP(URI)[foo.html]]
を枠線付きで埋込みます。未対応 UA
は [CODE(HTMLe)[iframe]] の内容をレンダリングします。
* 関連
[12] [CODE(HTMLe)[[[object]]]] 要素型を使っても HTML
文書などを埋込むことができます。属性などは異なりますが、
レンダリングなどに関してはおおむねどちらを使っても同じです。
また、多くの UA では基本的に利用者から見て同じようになります。
[FIG(quote)[
[FIGCAPTION[
[62] ([TIME[2015-06-11 18:29:20 +09:00]] 版)
<http://www.ecma.org/about-ecma/>
]FIGCAPTION]
>
> <div style="font-size: 10pt; line-height: 1.5em;">
> <p>ECMA is the International Network of Folding Carton Organisations; carton businesses, national carton associations and suppliers to the carton industry. <br /><br />ECMA provides the European folding carton industry with a dynamic business Network. <br /><br />With its seat in The Hague, The Netherlands, and an office in Brussels, ECMA represents 500 carton producers in nearly all countries in the European Economic Area. Around 70% of the total carton market volume in Europe, and a current workforce of about 45.000 people are represented in ECMA. <br /><br />ECMA works to fulfill its mission for the benefit of member companies in a variety of functions. As part of the ECMA Roadmap 2015 presented on the occasion of ECMA’s 50th anniversary, the association launched an ambitious programme dedicated to supporting the healthy development of European carton makers, raising the profile and professionalism of the European carton industry, developing advanced international standards and best practices, and helping carton makers grow their international network and expertise.<br /><br /><iframe src="uploads/Bestanden/Structure ECMA/120919-ECMA-5-flap-box-full.wmv" width="320" height="240"></iframe></p>
> <p><br />Download the brochure with Membership Information <strong><a title="ECMA Membership Brochure" href="uploads/Bestanden/Membership/ECMA Membership Information.pdf" target="_blank">here</a></strong>.</p>
> </div>
>
]FIG]
[63] >>62 は [CODE(HTMLe)@en[[[iframe]]]] を [[WMV]] に [[navigate]]
した結果[[プラグイン文書]]が[[レンダリング]]されることを想定しているのでしょうが、
[[WMV]] 用の[[プラグイン]]が存在しない環境ではページの表示と同時に[[ダウンロード]]が開始されてしまいます。