/
506.txt
50 lines (38 loc) · 2.36 KB
/
506.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
* 仕様書
[REFS[
- [8] [CITE@en-US-x-hixie[HTML Standard]] ([TIME[2013-05-05 06:42:10 +09:00]] 版) <http://www.whatwg.org/specs/web-apps/current-work/#events-and-the-window-object>
- [11] [CITE@en-GB-x-hixie[HTML Standard]] ([TIME[2015-05-06 10:42:35 +09:00]] 版) <https://html.spec.whatwg.org/#attr-iframe-seamless>
]REFS]
* イベントの木
[10] [[DOMイベント]]は[[木構造]]に対して定義されていますが、実際に[[木]]として使われるのは[[節点木]]
([CODE(DOMi)@en[[[Document]]]] や [CODE(DOMi)@en[[[Element]]]] の[[木]]) だけで、
それ以外のほとんどは単一の[[オブジェクト]]です。
* 木をまたぐイベントの伝播
[4] [[木]]構造を超えた[[イベント]]の伝播には次のものがあります。
[FIG(list)[
- [5] [CODE(DOMi)@en[[[Document]]]] -> [CODE(DOMi)@en[[[Window]]]] [SRC[>>8]]
- [6] [DEL[[CODE(HTMLe)@en[[[iframe]]]] [CODE(HTMLa)@en[[[seamless]]]] 境界 [SRC[>>11]]]]
-- [[子閲覧文脈]]の [CODE(DOMi)@en[[[Window]]]] の[[親]]が [CODE(DOMi)@en[[[iframe]]]]
- [7] [[影木]]境界 ([[XBL]] / [[Shadow DOM]])
]FIG]
* DOM イベント木における [CODE(DOMi)@en[Window]]
** 定義
[9] [[閲覧文脈]]中にある [CODE(DOMi)@en[[[Document]]]] に属する[[節点]]において[[イベント]]が[[ディスパッチ]]される時、
[[イベント型]]が [CODE(DOMe)@en[[[load]]]] である時を除き、
[CODE(DOMi)@en[[[Window]]]] が [CODE(DOMi)@en[[[Document]]]] の[[親]]であるように振舞わなければ[['''なりません''']]
[SRC[>>8]]。
* 歴史
[REFS[
-[1] [CITE@en[Bug 18780 – Fix event dispatching for shadow DOM and <iframe seamless>]]
( ([TIME[2013-05-05 14:48:07 +09:00]] 版))
<https://www.w3.org/Bugs/Public/show_bug.cgi?id=18780>
-[2] [CITE[IRC logs: freenode / #whatwg / 20121204]]
( ([TIME[2013-05-05 14:48:23 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20121204#l-1477>
]REFS]
[3] >>1 により [[HTML Standard]] は [[DOM Standard]] より [[event parent]] と
[[cross-boundary event parent]] を引用していますが、現時点で [[DOM Standard]]
に両者の定義はありません。 [TIME[2013-05-05T14:50:19.700Z]]
[12] [CITE@en[Remove <iframe seamless> · whatwg/html@1490eba]]
([TIME[2016-02-04 19:17:43 +09:00]] 版)
<https://github.com/whatwg/html/commit/1490eba4dba5ab476f0981443a86c01acae01311>