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
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
|
---
title: GlobalEventHandlers
slug: Web/API/GlobalEventHandlers
tags:
- API
- DOM
- GlobalEventHandlers
- HTML DOM
- Mixin
- NeedsTranslation
- Reference
- TopicStub
- events
translation_of: Web/API/GlobalEventHandlers
---
<div>{{ApiRef("HTML DOM")}}</div>
<p>The <strong><code>GlobalEventHandlers</code></strong> mixin describes the event handlers common to several interfaces like {{domxref("HTMLElement")}}, {{domxref("Document")}}, or {{domxref("Window")}}. Each of these interfaces can, of course, add more event handlers in addition to the ones listed below.</p>
<div class="note">
<p><strong>Note</strong>: <code>GlobalEventHandlers</code> is a mixin and not an interface; you can't actually create an object of type <code>GlobalEventHandlers</code>.</p>
</div>
<h2 id="Properties_2">Properties</h2>
<p><em>This interface doesn't include any properties except for the event handlers listed below.</em></p>
<h3 id="Event_handlers">Event handlers</h3>
<p>These event handlers are defined on the {{domxref("GlobalEventHandlers")}} mixin, and implemented by {{domxref("HTMLElement")}}, {{domxref("Document")}}, {{domxref("Window")}}, as well as by {{domxref("WorkerGlobalScope")}} for Web Workers.</p>
<div id="Properties">
<dl>
<dt>{{domxref("GlobalEventHandlers.onabort")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("abort")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.onanimationcancel")}} {{Non-standard_inline}}</dt>
<dd>An {{event("Event_handlers", "event handler")}} called when an {{event("animationcancel")}} event is sent, indicating that a running <a href="/en-US/docs/Web/CSS/CSS_Animations">CSS animation</a> has been canceled.</dd>
<dt>{{domxref("GlobalEventHandlers.onanimationend")}} {{Non-standard_inline}}</dt>
<dd>An {{event("Event_handlers", "event handler")}} called when an {{event("animationend")}} event is sent, indicating that a <a href="/en-US/docs/Web/CSS/CSS_Animations">CSS animation</a> has stopped playing.</dd>
<dt>{{domxref("GlobalEventHandlers.onanimationiteration")}} {{Non-standard_inline}}</dt>
<dd>An {{event("Event_handlers", "event handler")}} called when an {{event("animationiteration")}} event has been sent, indicating that a <a href="/en-US/docs/Web/CSS/CSS_Animations">CSS animation</a> has begun playing a new iteration of the animation sequence.</dd>
<dt>{{domxref("GlobalEventHandlers.onanimationstart")}} {{Non-standard_inline}}</dt>
<dd>An {{event("Event_handlers", "event handler")}} called when an {{event("animationstart")}} event is sent, indicating that a <a href="/en-US/docs/Web/CSS/CSS_Animations">CSS animation</a> has started playing.</dd>
<dt>{{domxref("GlobalEventHandlers.onauxclick")}} {{Non-standard_inline}}</dt>
<dd>An {{event("Event_handlers", "event handler")}} called when an {{event("auxclick")}} event is sent, indicating that a non-primary button has been pressed on an input device (e.g. a middle mouse button).</dd>
<dt>{{domxref("GlobalEventHandlers.onblur")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("blur")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.onerror")}}</dt>
<dd>Is an {{domxref("OnErrorEventHandler")}} representing the code to be called when the {{event("error")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.onfocus")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("focus")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.oncancel")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("cancel")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.oncanplay")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("canplay")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.oncanplaythrough")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("canplaythrough")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.onchange")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("change")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.onclick")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("click")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.onclose")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("close")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.oncontextmenu")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("contextmenu")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.oncuechange")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("cuechange")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.ondblclick")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("dblclick")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.ondrag")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("drag")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.ondragend")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("dragend")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.ondragenter")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("dragenter")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.ondragexit")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("dragexit")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.ondragleave")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("dragleave")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.ondragover")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("dragover")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.ondragstart")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("dragstart")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.ondrop")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("drop")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.ondurationchange")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("durationchange")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.onemptied")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("emptied")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.onended")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("ended")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.ongotpointercapture")}}</dt>
<dd>
<p>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("gotpointercapture")}} event type is raised.</p>
</dd>
<dt>{{domxref("GlobalEventHandlers.oninput")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("input")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.oninvalid")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("invalid")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.onkeydown")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("keydown")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.onkeypress")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("keypress")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.onkeyup")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("keyup")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.onload")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("load")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.onloadeddata")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("loadeddata")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.onloadedmetadata")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("loadedmetadata")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.onloadend")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("loadend")}} event is raised (when progress has stopped on the loading of a resource.)</dd>
<dt>{{domxref("GlobalEventHandlers.onloadstart")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("loadstart")}} event is raised (when progress has begun on the loading of a resource.)</dd>
<dt>{{domxref("GlobalEventHandlers.onlostpointercapture")}}</dt>
<dd>
<p>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("lostpointercapture")}} event type is raised.</p>
</dd>
<dt>{{domxref("GlobalEventHandlers.onmousedown")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("mousedown")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.onmouseenter")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("mouseenter")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.onmouseleave")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("mouseleave")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.onmousemove")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("mousemove")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.onmouseout")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("mouseout")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.onmouseover")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("mouseover")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.onmouseup")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("mouseup")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.onmousewheel")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("mousewheel")}} event is raised.</dd>
<dt>{{ domxref("GlobalEventHandlers.onwheel") }}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("wheel")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.onpause")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("pause")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.onplay")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("play")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.onplaying")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("playing")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.onpointerdown")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("pointerdown")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.onpointermove")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("pointermove")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.onpointerup")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("pointerup")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.onpointercancel")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("pointercancel")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.onpointerover")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("pointerover")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.onpointerout")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("pointerout")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.onpointerenter")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("pointerevent")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.onpointerleave")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("pointerleave")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.onpointerlockchange")}} {{experimental_inline}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("pointerlockchange")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.onpointerlockerror")}} {{experimental_inline}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("pointerlockerror")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.onprogress")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("progress")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.onratechange")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("ratechange")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.onreset")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("reset")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.onscroll")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("scroll")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.onseeked")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("seeked")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.onseeking")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("seeking")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.onselect")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("select")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.onselectstart")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("selectionchange")}} event is raised, i.e. when the user starts to make a new text selection on a web page.</dd>
<dt>{{domxref("GlobalEventHandlers.onselectionchange")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("selectionchange")}} event is raised, i.e. when the text selected on a web page changes.</dd>
<dt>{{domxref("GlobalEventHandlers.onshow")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("show")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.onsort")}} {{experimental_inline}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("sort")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.onstalled")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("stalled")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.onsubmit")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("submit")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.onsuspend")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("suspend")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.ontimeupdate")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("timeupdate")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.onvolumechange")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("volumechange")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.ontouchcancel")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("touchcancel")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.ontouchend")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("touchend")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.ontouchmove")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("touchmove")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.ontouchstart")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("touchstart")}} event is raised.</dd>
<dt>{{domxref("GlobalEventHandlers.ontransitioncancel")}}</dt>
<dd>An {{event("Event_handlers", "event handler")}} called when a {{event("transitioncancel")}} event is sent, indicating that a <a href="/en-US/docs/Web/CSS/CSS_Transitions">CSS transition</a> has been cancelled.</dd>
<dt>{{domxref("GlobalEventHandlers.ontransitionend")}}</dt>
<dd>An {{event("Event_handlers", "event handler")}} called when a {{event("transitionend")}} event is sent, indicating that a <a href="/en-US/docs/Web/CSS/CSS_Transitions">CSS transition</a> has finished playing.</dd>
<dt>{{domxref("GlobalEventHandlers.onwaiting")}}</dt>
<dd>Is an {{event("Event_handlers", "event handler")}} representing the code to be called when the {{event("waiting")}} event is raised.</dd>
</dl>
</div>
<h2 id="Methods">Methods</h2>
<p><em>This interface defines no methods.</em></p>
<h2 id="Specifications">Specifications</h2>
<table class="standard-table">
<thead>
<tr>
<th scope="col">Specification</th>
<th scope="col">Status</th>
<th scope="col">Comment</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{SpecName("Selection API",'', 'Extension to GlobalEventHandlers')}}</td>
<td>{{Spec2('Selection API')}}</td>
<td>Adds <code>onselectionchange.</code></td>
</tr>
<tr>
<td>{{SpecName('Pointer Lock', '#extensions-to-the-document-interface', 'Extension of Document')}}</td>
<td>{{Spec2('Pointer Lock')}}</td>
<td>Adds <code>onpointerlockchange</code> and <code>onpointerlockerror</code> on {{domxref("Document")}}. It is experimentally implemented on <code>GlobalEventHandlers</code>.</td>
</tr>
<tr>
<td>{{SpecName('HTML WHATWG', '#globaleventhandlers', 'GlobalEventHandlers')}}</td>
<td>{{Spec2('HTML WHATWG')}}</td>
<td>No change since the latest snapshot, {{SpecName("HTML5.1")}}.</td>
</tr>
<tr>
<td>{{SpecName('HTML5.1', '#globaleventhandlers', 'GlobalEventHandlers')}}</td>
<td>{{Spec2('HTML5.1')}}</td>
<td>Snapshot of {{SpecName("HTML WHATWG")}}. Added <code>onsort</code> since the {{SpecName("HTML5 W3C")}} snapshot.</td>
</tr>
<tr>
<td>{{SpecName("HTML5 W3C", "#globaleventhandlers", "GlobalEventHandlers")}}</td>
<td>{{Spec2('HTML5 W3C')}}</td>
<td>Snapshot of {{SpecName("HTML WHATWG")}}. Creation of <code>GlobalEventHandlers</code> (properties where on the target before it).</td>
</tr>
</tbody>
</table>
<h2 id="Browser_compatibility">Browser compatibility</h2>
<p>{{CompatibilityTable}}</p>
<div id="compat-desktop">
<table class="compat-table">
<tbody>
<tr>
<th>Feature</th>
<th>Firefox (Gecko)</th>
<th>Chrome</th>
<th>Edge</th>
<th>Internet Explorer</th>
<th>Opera</th>
<th>Safari</th>
</tr>
<tr>
<td>Basic support</td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
</tr>
<tr>
<td><code>oncanplay</code>, <code>oncanplaythrough</code>, <code>ondurationchange</code>, <code>onemptied</code>, <code>onended</code>, <code>onloadeddata</code>, <code>onloadedmetadata</code>, <code>onloadstart</code>, <code>onpause</code>, <code>onplay</code>, <code>onplaying</code>, <code>onprogress</code>, <code>onratechange</code>, <code>onseeked</code>, <code>onseeking</code>, <code>onstalled</code>, <code>ontimeupdate</code>, <code>onvolumechange</code>, <code>onwaiting</code></td>
<td>{{CompatGeckoDesktop(1.9.1)}}</td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
</tr>
<tr>
<td><code>onsuspend</code></td>
<td>{{CompatGeckoDesktop(1.9.2)}}</td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
</tr>
<tr>
<td><code>ondrag</code>, <code>ondragend</code>, <code>ondragenter</code>, <code>ondragleave</code>, <code>ondragover</code>, <code>ondragstart</code>, <code>ondrop</code></td>
<td>{{CompatGeckoDesktop(1.9.1)}}</td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
</tr>
<tr>
<td><code>onmouseenter</code>, <code>onmouseleave</code></td>
<td>{{CompatGeckoDesktop(10)}}</td>
<td>{{CompatChrome(30.0)}}</td>
<td>{{CompatUnknown}}</td>
<td>5.5</td>
<td>17</td>
<td>{{CompatUnknown}}</td>
</tr>
<tr>
<td><code>ondragexit</code></td>
<td>{{CompatNo}}</td>
<td>{{CompatNo}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
</tr>
<tr>
<td><code>oncancel</code></td>
<td>{{CompatNo}}</td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
</tr>
<tr>
<td><code>onclose</code></td>
<td>{{CompatNo}}</td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
</tr>
<tr>
<td><code>oncuechange</code></td>
<td>{{CompatNo}}</td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
</tr>
<tr>
<td><code>onmousewheel</code></td>
<td>{{CompatNo}}</td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
</tr>
<tr>
<td><code>onsort</code> {{experimental_inline}}</td>
<td>{{CompatNo}}</td>
<td>{{CompatNo}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
</tr>
<tr>
<td><code>onmozfullscreenchange</code>, <code>onmozfullscreenerror</code> {{non-standard_inline}}</td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatVersionUnknown}} {{property_prefix("-webkit")}}<br>
{{CompatVersionUnknown}} (unprefixed)</td>
<td>{{CompatNo}}</td>
<td>{{CompatNo}}</td>
<td>{{CompatNo}}</td>
<td>{{CompatNo}}</td>
</tr>
<tr>
<td><code>onpointerlockchange</code>, <code>onpointerlockerror</code></td>
<td>{{CompatGeckoDesktop(10)}}<sup>[1]</sup></td>
<td>{{CompatVersionUnknown}}<sup>[2] </sup>{{property_prefix("-webkit")}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
</tr>
<tr>
<td><code>onpointercancel</code>, <code>onpointerdown</code>, <code>onpointerup</code>, <code>onpointermove</code>, <code>onpointerout</code>, <code>onpointerover</code>, <code>onpointerenter</code>, <code>onpointerleave</code></td>
<td>{{CompatVersionUnknown}}<sup>[3]</sup></td>
<td>{{CompatChrome(55.0)}}</td>
<td>{{CompatVersionUnknown}}</td>
<td>10</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
</tr>
<tr>
<td><code>onselectionchange</code></td>
<td>{{CompatGeckoDesktop(43)}}<sup>[4]</sup></td>
<td>{{CompatNo}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
</tr>
<tr>
<td><code>ontouchend</code>, <code>ontouchcancel</code>, <code>ontouchmove</code>, <code>ontouchstart</code></td>
<td>{{CompatUnknown}}</td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
</tr>
<tr>
<td><code>animationstart</code>, <code>animationend</code>, <code>animationcancel</code>, <code>animationiteration</code></td>
<td>{{CompatGeckoDesktop(51)}}</td>
<td>{{CompatVersionUnknown}} {{property_prefix("-webkit")}}<br>
{{CompatVersionUnknown}} (unprefixed)</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
</tr>
<tr>
<td><code>ongotpointercapture</code>, <code>onlostpointercapture</code></td>
<td>{{CompatUnknown}}</td>
<td>{{CompatChrome(57.0)}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatOpera(44)}}</td>
<td>{{CompatUnknown}}</td>
</tr>
<tr>
<td><code>onauxclick</code></td>
<td>{{CompatGeckoDesktop(53)}}</td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatNo}}</td>
<td>{{CompatNo}}</td>
<td>{{CompatNo}}</td>
<td>{{CompatNo}}</td>
</tr>
<tr>
<td><code>onwheel</code></td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatVersionUnknown}}</td>
</tr>
</tbody>
</table>
</div>
<div id="compat-mobile">
<table class="compat-table">
<tbody>
<tr>
<th>Feature</th>
<th>Android Webview</th>
<th>Edge</th>
<th>Firefox Mobile (Gecko)</th>
<th>Android</th>
<th>IE Mobile</th>
<th>Opera Mobile</th>
<th>Safari Mobile</th>
<th>Chrome for Android</th>
</tr>
<tr>
<td>Basic support</td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatVersionUnknown}}</td>
</tr>
<tr>
<td><code>ondrag</code>, <code>ondragend</code>, <code>ondragenter</code>, <code>ondragleave</code>, <code>ondragover</code>, <code>ondragstart</code>, <code>ondrop</code></td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatGeckoMobile(1.9.1)}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
</tr>
<tr>
<td><code>oncanplay</code>, <code>oncanplaythrough</code>, <code>ondurationchange</code>, <code>onemptied</code>, <code>onended</code>, <code>onloadeddata</code>, <code>onloadedmetadata</code>, <code>onloadstart</code>, <code>onpause</code>, <code>onplay</code>, <code>onplaying</code>, <code>onprogress</code>, <code>onratechange</code>, <code>onseeked</code>, <code>onseeking</code>, <code>onstalled</code>, <code>ontimeupdate</code>, <code>onvolumechange</code>, <code>onwaiting</code></td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatGeckoMobile(1.9.1)}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatVersionUnknown}}</td>
</tr>
<tr>
<td><code>onmouseenter</code>, <code>onmouseleave</code></td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatGeckoMobile(10)}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatVersionUnknown}}</td>
</tr>
<tr>
<td><code>onsuspend</code></td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatGeckoMobile(1.9.2)}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatVersionUnknown}}</td>
</tr>
<tr>
<td><code>ondragexit</code></td>
<td>{{CompatNo}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatNo}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatNo}}</td>
</tr>
<tr>
<td><code>oncancel</code></td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatNo}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatVersionUnknown}}</td>
</tr>
<tr>
<td><code>onclose</code></td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatNo}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatVersionUnknown}}</td>
</tr>
<tr>
<td><code>oncuechange</code></td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatNo}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatVersionUnknown}}</td>
</tr>
<tr>
<td><code>onmousewheel</code></td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatNo}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatVersionUnknown}}</td>
</tr>
<tr>
<td><code>onsort</code></td>
<td>{{CompatNo}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatNo}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatNo}}</td>
</tr>
<tr>
<td><code>onmozfullscreenchange</code>, <code>onmozfullscreenerror</code> {{non-standard_inline}}</td>
<td>{{CompatVersionUnknown}} {{property_prefix("-webkit")}}<br>
{{CompatVersionUnknown}} (unprefixed)</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatNo}}</td>
<td>{{CompatNo}}</td>
<td>{{CompatNo}}</td>
<td>{{CompatNo}}</td>
<td>{{CompatVersionUnknown}} {{property_prefix("-webkit")}}<br>
{{CompatVersionUnknown}} (unprefixed)</td>
</tr>
<tr>
<td><code>onpointerlockchange</code>, <code>onpointerlockerror</code></td>
<td>{{CompatNo}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatGeckoMobile(10)}}<sup>[1]</sup></td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatNo}}</td>
</tr>
<tr>
<td><code>onpointercancel</code>, <code>onpointerdown</code>, <code>onpointerup</code>, <code>onpointermove</code>, <code>onpointerout</code>, <code>onpointerover</code>, <code>onpointerenter</code>, <code>onpointerleave</code></td>
<td>{{CompatChrome(55.0)}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatVersionUnknown}}<sup>[3]</sup></td>
<td>{{CompatNo}}</td>
<td>10</td>
<td>{{CompatNo}}</td>
<td>{{CompatNo}}</td>
<td>{{CompatChrome(55.0)}}</td>
</tr>
<tr>
<td><code>onselectionchange</code></td>
<td>{{CompatNo}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatGeckoMobile(43)}}<sup>[4]</sup></td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatNo}}</td>
</tr>
<tr>
<td><code>ontouchend</code>, <code>ontouchcancel</code>, <code>ontouchmove</code>, <code>ontouchstart</code></td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatVersionUnknown}}</td>
</tr>
<tr>
<td><code>animationstart</code>, <code>animationend</code>, <code>animationcancel</code>, <code>animationiteration</code></td>
<td>{{CompatVersionUnknown}} {{property_prefix("-webkit")}}<br>
{{CompatVersionUnknown}} (unprefixed)</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatGeckoMobile(51)}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatVersionUnknown}} {{property_prefix("-webkit")}}<br>
{{CompatVersionUnknown}} (unprefixed)</td>
</tr>
<tr>
<td><code>ongotpointercapture</code>, <code>onlostpointercapture</code></td>
<td>{{CompatChrome(57.0)}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatOperaMobile(44)}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatChrome(57.0)}}</td>
</tr>
<tr>
<td><code>onauxclick</code></td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatNo}}</td>
<td>{{CompatGeckoMobile(53)}}</td>
<td>{{CompatNo}}</td>
<td>{{CompatNo}}</td>
<td>{{CompatNo}}</td>
<td>{{CompatNo}}</td>
<td>{{CompatVersionUnknown}}</td>
</tr>
<tr>
<td><code>onwheel</code></td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatVersionUnknown}}</td>
</tr>
</tbody>
</table>
</div>
<p>[1] In Gecko this is implemented as <code>onmozpointerlockchange</code>, <code>onmozpointerlockerror</code>.</p>
<p>[2] In Blink this is implemented as <code>onwebkitpointerlockchange</code>, <code>onwebkitpointerlockerror</code>.</p>
<p>[3] This is implemented behind the <code>dom.w3c_pointer_events.enabled</code> preference, defaulting to <code>false</code>.</p>
<p>[4] This is implemented behind the <code>dom.select_events.enabled</code> preference, that default to <code>false</code>, except on Nightly.</p>
<h2 id="See_also">See also</h2>
<ul>
<li>{{domxref("Element")}}</li>
<li>{{event("Event_handlers", "event handler")}}</li>
<li>{{domxref("Event")}}</li>
</ul>
|