/
616.txt
248 lines (188 loc) · 11.3 KB
/
616.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
* 仕様書
[REFS[
- [34] [CITE@en[UI Events]] ([TIME[2016-04-03 11:58:10 +09:00]] 版)
<https://w3c.github.io/uievents/>
]REFS]
* 入力装置関係のイベントと API
[27] [[イベント]]や [[API]]:
[FIG(short list)[
- [CODE(DOMi)@en[[[MouseEvent]]]]
- [[Touch Events]]
- [[Pointer Events]]
- [[Gesture Events]]
- [[Mouse gesture events]]
- [CODE(DOMi)@en[[[KeyboardEvent]]]]
- [CODE(DOMi)@en[[[TextEvent]]]]
- [CODE(DOMi)@en[[[FocusEvent]]]], [CODE(HTMLa)@en[[[tabindex]]]], [CODE(CSS)@en[[[nav-*]]]]
- [CODE(HTMLa)@en[[[accesskey]]]], [CODE(CSS)@en[[[key-equivalent]]]]
- [[IndieUI]]
- [CODE(DOMa)@en[[[wiiremote]]]]
- [[IME API]]
- [CODE(HTMLa)@en[[[inputmode]]]]
- [CODE(CSS)@en[[[ime-mode]]]]
]FIG]
[28] [[利用者インターフェイス]]操作:
[FIG(short list)[
- [[鍵盤操作 (Webブラウザー)]]
- [[マウス操作 (Webブラウザー)]]
-- [[クリック]]
-- [[ドラッグアンドドロップ]]
-- [[マウスジェスチャー]]
]FIG]
[35] 操作は、[[プラットフォーム]]次第で、物理的な[[装置]]に由来することもあれば、
[[ソフトウェア]]によってエミュレートされている
([[ソフトウェアキーボード]]や[[アクセス可能性]]機能など。) こともあります。
あるいは、 [[WebDriver]] のような [[Webブラウザー]]操作機能に由来することもあります。
* 著者による利用者操作の妨害
[31] [[著者]]の[[スクリプト]]により次のような[[イベント]]の[[既定動作]]を[[取消]]するなどの方法で、
[[利用者]]の操作が妨害されることがあります。
[[Webブラウザー]]は、そのような妨害を受けずに[[利用者]]の操作を受け付ける方法を用意するべきです。
[FIG(list)[
- [CODE(DOMe)@en[[[contextmenu]]]] [[イベント]] - [[Webブラウザー]]の[[文脈メニュー]]の表示を妨害する
- [CODE(DOMe)@en[[[copy]]]] [[イベント]]、[CODE(DOMe)@en[[[cut]]]] [[イベント]]、
[CODE(DOMe)@en[[[paste]]]] [[イベント]] - [[クリップボード]]操作を拒絶する
- [CODE(DOMe)@en[[[select]]]] [[イベント]]、[CODE(DOMe)@en[[[selectstart]]]] [[イベント]]、[CODE(DOMe)@en[[[drag]]]] [[イベント]]、[CODE(DOMe)@en[[[dragstart]]]] [[イベント]] - [[選択]]操作を妨害する
- [[キーボードイベント]] - [[再読込]]、[[戻る]]などの操作を妨害する
- [[キーボードイベント]] [KBD[[KBD[[[Ctrl]]]] + [KBD[[[F]]]]]] - [[検索]]を (低品質に) 独自実装する
- [CODE(HTML)@en[[[<meta name=viewport>]]]] - [[拡大]]・[[縮小]]操作を拒絶する
- [CODE(CSS)@en[[[scrollbar-[VAR[*]]]]]] - [[スクロールバー]]を細くして[[利用者]]が操作しづらくする
- [CODE(CSS)@en[[[overflow]]: [[hidden]]]] - [[スクロール]]を拒絶する
- [CODE(DOMe)@en[[[pushState]]]]: [[履歴]]操作を妨害する
]FIG]
[32] [[著者]]は、こうした[[利用者]]の通常の閲覧操作に介入するべきではありません。
* [CODE(DOMi)@en[UIEvent]] インターフェイス (DOM)
** 仕様書
[REFS[
- [9] [CITE@en-US[Document Object Model (DOM) Level 3 Events Specification]] ([TIME[2012-10-25 23:58:38 +09:00]] 版) <http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#events-UIEvent>
- [8] [CITE@en[UI Events]] ([TIME[2013-05-08 13:22:50 +09:00]] 版) <https://dvcs.w3.org/hg/d4e/raw-file/tip/source_respec.htm#constructor-uievent>
]REFS]
** 状態
[36] [CODE(DOMi)@en[Event]] の共通の状態に加えて:
[FIG(list members)[
: [F[実際の指示装置由来かどうか]] :
[[ハイパーリンク接尾辞]]の決定に使われます。 [F[trusted]] と同義なのかどうかは定かではありません。
それに加えて[[鍵盤]]操作による擬似[[クリック]]を除外する意図もありそうです。
]FIG]
* 歴史
[17] 利用者界面イベント。外部機器 ([[マウス]], [[鍵盤]]等) による利用者の動作により発生する。 (''Document Object Model Events'' <http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-overview-terminology>)
[1] 【DOM】[[外部機器]] ([[マウス]], [[鍵盤]]等)
による[[利用者]]の動作により発生する[[事象]]。UI Event。
[2] [[DOM2]] UI Events がその最初の仕様。ただし [[DOM0]] の [[on*]]
属性/特性がその祖先に当たる。 (直接的には互換性はないが、
仕様策定上矛盾がないようには配慮されている。[WEAK[ちなみに、 on* 属性群の直接の子孫に当たるのが [[XMLEvent]]。つまり、事象の振る舞いとしての定義は DOM へ、記述方法としてのマークは XML Event が後継規格。]])
[3] DOM 2 が [[WinIE]] でなかなか実装されないのは [[Netscape]]
の提案に大幅に基づいているからだという噂があるが、 UI 事象の部は特に
Netscape の影響が強い。 M$ は 永遠に実装しない気だろうか?
** 旧 UI イベント仕様書
[5] [CITE@en[UI Events]]
( ([TIME[2013-02-10 17:04:08 +09:00]] 版))
<https://dvcs.w3.org/hg/d4e/raw-file/tip/source_respec.htm>
[REFS[
-[6] [CITE@en[Re: "DOM4 Events" name (was: RE: ReSpec BiblioDB Entry for DOM Level 4 Events)]]
( ([[Anne van Kesteren]] 著, [TIME[2013-01-08 03:57:19 +09:00]] 版))
<http://lists.w3.org/Archives/Public/www-dom/2013JanMar/0022.html>
-[7] [CITE@en[Re: ReSpec BiblioDB Entry for DOM Level 4 Events]]
( ([[Anne van Kesteren]] 著, [TIME[2013-01-05 20:55:32 +09:00]] 版))
<http://lists.w3.org/Archives/Public/www-dom/2013JanMar/0002.html>
]REFS]
[10] [CITE@en[UI Events]]
( ([TIME[2013-07-25 05:49:20 +09:00]] 版))
<http://www.w3.org/TR/2013/WD-uievents-20130725/>
[11] [CITE[IRC logs: freenode / #whatwg / 20131024]]
( ([TIME[2013-10-26 18:11:45 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20131024>
[12] [CITE@en[UI Events]]
( ([TIME[2013-11-05 13:57:17 +09:00]] 版))
<http://www.w3.org/TR/2013/WD-uievents-20131105/>
[13] [CITE@en[UI Events]]
( ([[Anne van Kesteren]] 著, [TIME[2014-02-04 22:30:44 +09:00]] 版))
<http://lists.w3.org/Archives/Public/www-dom/2014JanMar/0064.html>
[14] [CITE@en[Re: Pointer Events spec and UIEvents reference]]
( ([[Кошмарчик]] 著, [TIME[2014-04-19 02:34:55 +09:00]] 版))
<http://lists.w3.org/Archives/Public/public-pointer-events/2014AprJun/0033.html>
[15] [CITE@en[Web input brainstorming face-to-face notes]]
( ([[Rick Byers]] 著, [TIME[2014-07-03 22:51:48 +09:00]] 版))
<http://lists.w3.org/Archives/Public/www-style/2014Jul/0050.html>
[16] [CITE[IRC logs: freenode / #whatwg / 20140729]]
( ([TIME[2014-07-30 09:45:34 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20140729>
[18] [CITE[IRC logs: freenode / #whatwg / 20121128]]
( ([TIME[2012-12-09 02:18:35 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20121128#l-1719>
[19] [CITE@en[Web Applications 1.0 r8697 Make sure places that use UIEvent define .detail and .view]]
( ([TIME[2014-08-02 07:04:00 +09:00]] 版))
<http://html5.org/r/8697>
[20] [CITE@en[RE: "DOM4 Events" name (was: RE: ReSpec BiblioDB Entry for DOM Level 4 Events)]]
( ([[Travis Leithead]] 著, [TIME[2013-01-08 04:48:50 +09:00]] 版))
<http://lists.w3.org/Archives/Public/www-dom/2013JanMar/0025.html>
** D3E との統合
[21] [CITE@en[Re: CfC: publish WG Note of UI Events; deadline November 14]]
( ([[Anne van Kesteren]] 著, [TIME[2014-11-08 00:36:03 +09:00]] 版))
<http://lists.w3.org/Archives/Public/public-webapps/2014OctDec/0344.html>
[4] [CITE@en[''''''[''''''UIEvents'''''']'''''' telecon minutes 10 March 2015]]
([[Travis Leithead]] 著, [TIME[2015-03-11 10:03:54 +09:00]] 版)
<https://lists.w3.org/Archives/Public/public-webapps/2015JanMar/0776.html>
[22] [CITE@en[Re: CfC: publish WG Note of UI Events; deadline November 14]]
([[Arthur Barstow]] 著, [TIME[2015-03-12 22:23:52 +09:00]] 版)
<https://lists.w3.org/Archives/Public/public-webapps/2015JanMar/0786.html>
[23] [CITE@en[UI Events (Keyboard Extension)]]
([TIME[2015-03-12 01:03:08 +09:00]] 版)
<http://jay.w3.org/~plehegar/uievents-ext.html>
[24] [CITE@en-US[UI Events Specification (formerly DOM Level 3 Events)]]
([TIME[2015-03-12 06:17:38 +09:00]] 版)
<http://jay.w3.org/~plehegar/uievents.html>
[25] [CITE@en-US[UI Events (formerly DOM Level 3 Events)]]
( ([TIME[2015-03-19 05:12:23 +09:00]] 版))
<http://www.w3.org/TR/2015/WD-uievents-20150319/>
[26] <http://www.w3.org/TR/DOM-Level-3-Events/> も >>25 を指すようになりました。
[TIME[2015-03-20T01:50:20.500Z]]
[29] [CITE@en-US[UI Events (formerly DOM Level 3 Events)]]
( ([TIME[2015-04-25 02:33:53 +09:00]] 版))
<http://www.w3.org/TR/2015/WD-uievents-20150428/>
[30] [CITE@en[Update D3Events reference to UI Events · whatwg/html@9cbeb03]]
([TIME[2015-09-03 14:36:16 +09:00]] 版)
<https://github.com/whatwg/html/commit/9cbeb03959c06541651fcf2a8c3a00a665b79d26>
[33] [CITE@en[Fix #19: Remove majority of "DOM Event Architecture" section · w3c/uievents@6cb42db]]
([TIME[2016-03-08 18:11:37 +09:00]] 版)
<https://github.com/w3c/uievents/commit/6cb42db4054c5502d28c3f53c6ae64da5e475747>
[FIG(quote)[
[FIGCAPTION[
[37] [CITE@ja[Johnny's net]]
([TIME[2016-08-14 01:17:41 +09:00]])
<http://www.johnnys-net.jp/page?id=text&dataId=1110>
]FIGCAPTION]
> $(document).on("contextmenu",function(){return!1}),$(document).on("keydown",function(){if("undefined"===typeof KEY_ENABLE)return!1}
]FIG]
[38] [CITE@en[Infrastructure for actions dispatch and implementation for null and k…]]
([[jgraham]]著, [TIME[2016-09-13 05:57:58 +09:00]])
<https://github.com/w3c/webdriver/commit/e70ea24e65883b404f2a72166ddaa0d1211905a7>
[39] [CITE@en[UI Event Order]]
([TIME[2016-09-23 16:47:43 +09:00]])
<https://rawgit.com/garykac/event-order/master/index.html>
[40] [CITE@en[garykac/event-order]]
([TIME[2016-09-23 16:47:52 +09:00]])
<https://github.com/garykac/event-order>
[41] [CITE@en['''['''ui-events''']''' MouseEvent details]]
([[Anne van Kesteren]]著, [TIME[2013-02-13 00:07:13 +09:00]])
<https://lists.w3.org/Archives/Public/www-dom/2013JanMar/0128.html>
[42] [CITE@en[UI Events]]
([[Anne van Kesteren]]著, [TIME[2014-02-04 22:30:44 +09:00]])
<https://lists.w3.org/Archives/Public/www-dom/2014JanMar/0064.html>
[43] [CITE@en[When the events are fired seems strange · Issue #9 · w3c/input-events]]
([TIME[2016-09-29 11:00:09 +09:00]])
<https://github.com/w3c/input-events/issues/9>
[44] [CITE@en[Consider pointerup as user gesture by NavidZ · Pull Request #1875 · whatwg/html]]
([TIME[2016-10-13 13:00:12 +09:00]])
<https://github.com/whatwg/html/pull/1875>
[45] [CITE@en[Specify the Event Loop integration for various non-deprecated events, incl. hit testing · Issue #23 · w3c/uievents]]
([TIME[2016-10-21 16:16:57 +09:00]])
<https://github.com/w3c/uievents/issues/23>
[46] [CITE@en[Lack of interaction event specification · Issue #1927 · whatwg/html]]
([TIME[2016-10-21 16:17:15 +09:00]])
<https://github.com/whatwg/html/issues/1927>
[47] [CITE@en[Editorial: major cleanup around firing and dispatching events]]
([[annevk]]著, [TIME[2016-10-19 01:00:43 +09:00]])
<https://github.com/whatwg/html/commit/8ffbd146d4709057e45dd6cfc81e7a70897050c5>
[48] [CITE@en[Align activation behavior with changes to DOM Standard]]
([[annevk]]著, [TIME[2016-10-21 00:06:40 +09:00]])
<https://github.com/whatwg/html/commit/7beb920ba2e1a71246b81d86005f223a0d7ac8ab>