-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheventAttributes.go
499 lines (428 loc) · 16.9 KB
/
eventAttributes.go
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
package godom
import (
"github.com/tbe/godom/helpers"
"github.com/tbe/godom/types"
)
// The OnAfterPrint attribute specifies a script to be run after the document is printed.
//
// This is a global types.Attribute.
func OnAfterPrint(script string) types.Attribute {
return helpers.SingleAttribute("onafterprint", script)
}
// The OnBeforePrint attribute specifies a script to be run before the document is printed.
//
// This is a global types.Attribute.
func OnBeforePrint(script string) types.Attribute {
return helpers.SingleAttribute("onbeforeprint", script)
}
// The OnBeforeUnload attribute specifies a script to be run when the document is about to be unloaded.
//
// This is a global types.Attribute.
func OnBeforeUnload(script string) types.Attribute {
return helpers.SingleAttribute("onbeforeunload", script)
}
// The OnError attribute specifies a script to be run when an error occurs.
//
// This is a global types.Attribute.
func OnError(script string) types.Attribute {
return helpers.SingleAttribute("onerror", script)
}
// The OnHashChange attribute specifies a script to be run when there has been changes to the anchor part of the URL.
//
// This is a global types.Attribute.
func OnHashChange(script string) types.Attribute {
return helpers.SingleAttribute("onhashchange", script)
}
// The OnLoad attribute specifies a script to be run after the page is finished loading.
//
// This is a global types.Attribute.
func OnLoad(script string) types.Attribute {
return helpers.SingleAttribute("onload", script)
}
// The OnMessage attribute specifies a script to be run when the message is triggered.
//
// This is a global types.Attribute.
func OnMessage(script string) types.Attribute {
return helpers.SingleAttribute("onmessage", script)
}
// The OnOffline attribute specifies a script to be run when the browser starts to work offline.
//
// This is a global types.Attribute.
func OnOffline(script string) types.Attribute {
return helpers.SingleAttribute("onoffline", script)
}
// The OnOnline attribute specifies a script to be run when the browser starts to work online.
//
// This is a global types.Attribute.
func OnOnline(script string) types.Attribute {
return helpers.SingleAttribute("ononline", script)
}
// The OnPageHide attribute specifies a script to be run when a user navigates away from a page.
//
// This is a global types.Attribute.
func OnPageHide(script string) types.Attribute {
return helpers.SingleAttribute("onpagehide", script)
}
// The OnPageShow attribute specifies a script to be run when a user navigates to a page.
//
// This is a global types.Attribute.
func OnPageShow(script string) types.Attribute {
return helpers.SingleAttribute("onpageshow", script)
}
// The OnPopState attribute specifies a script to be run when the window's history changes.
//
// This is a global types.Attribute.
func OnPopState(script string) types.Attribute {
return helpers.SingleAttribute("onpopstate", script)
}
// The OnResize attribute specifies a script to be run when the browser window is resized.
//
// This is a global types.Attribute.
func OnResize(script string) types.Attribute {
return helpers.SingleAttribute("onresize", script)
}
// The OnStorage attribute specifies a script to be run when a Web Storage area is updated.
//
// This is a global types.Attribute.
func OnStorage(script string) types.Attribute {
return helpers.SingleAttribute("onstorage", script)
}
// The OnUnload attribute specifies a script to be run once the page has unloaded (or the browser window has been closed).
//
// This is a global types.Attribute.
func OnUnload(script string) types.Attribute {
return helpers.SingleAttribute("onunload", script)
}
// The OnBlur attribute specifies a script to be run the moment that the Element loses focus.
//
// This is a global types.Attribute.
func OnBlur(script string) types.Attribute {
return helpers.SingleAttribute("onblur", script)
}
// The OnChange attribute specifies a script to be run the moment when the value of the Element is changed.
//
// This is a global types.Attribute.
func OnChange(script string) types.Attribute {
return helpers.SingleAttribute("onchange", script)
}
// The OnContextMenu attribute specifies a script to be run when a context menu is triggered.
//
// This is a global types.Attribute.
func OnContextMenu(script string) types.Attribute {
return helpers.SingleAttribute("oncontextmenu", script)
}
// The OnFocus attribute specifies a script to be run the moment when the Element gets focus.
//
// This is a global types.Attribute.
func OnFocus(script string) types.Attribute {
return helpers.SingleAttribute("onfocus", script)
}
// The OnInput attribute specifies a script to be run when an Element gets user input.
//
// This is a global types.Attribute.
func OnInput(script string) types.Attribute {
return helpers.SingleAttribute("oninput", script)
}
// The OnInvalid attribute specifies a script to be run when an Element is invalid.
//
// This is a global types.Attribute.
func OnInvalid(script string) types.Attribute {
return helpers.SingleAttribute("oninvalid", script)
}
// The OnReset attribute specifies a script to be run when the Reset Button in a form is clicked.
//
// This is a global types.Attribute.
func OnReset(script string) types.Attribute {
return helpers.SingleAttribute("onreset", script)
}
// The OnSearch attribute specifies a script to be run when the user writes something in a search field.
//
// This is a global types.Attribute.
func OnSearch(script string) types.Attribute {
return helpers.SingleAttribute("onsearch", script)
}
// The OnSelect attribute specifies a script to be run after some text has been selected in an Element.
//
// This is a global types.Attribute.
func OnSelect(script string) types.Attribute {
return helpers.SingleAttribute("onselect", script)
}
// The OnKeyDown attribute specifies a script to be run when a user is pressing a key.
//
// This is a global types.Attribute.
func OnKeyDown(script string) types.Attribute {
return helpers.SingleAttribute("onkeydown", script)
}
// The OnKeyPress attribute specifies a script to be run when a user presses a key.
//
// This is a global types.Attribute.
func OnKeyPress(script string) types.Attribute {
return helpers.SingleAttribute("onkeypress", script)
}
// The OnKeyUp attribute specifies a script to be run when a user releases a key.
//
// This is a global types.Attribute.
func OnKeyUp(script string) types.Attribute {
return helpers.SingleAttribute("onkeyup", script)
}
// The OnClick attribute specifies a script to be run on a mouse click on the Element.
//
// This is a global types.Attribute.
func OnClick(script string) types.Attribute {
return helpers.SingleAttribute("onclick", script)
}
// The OnDoubleClick attribute specifies a script to be run on a mouse double-click on the Element.
//
// This is a global types.Attribute.
func OnDoubleClick(script string) types.Attribute {
return helpers.SingleAttribute("ondblclick", script)
}
// The OnMouseDown attribute specifies a script to be run when a mouse button is pressed down on an element.
//
// This is a global types.Attribute.
func OnMouseDown(script string) types.Attribute {
return helpers.SingleAttribute("onmousedown", script)
}
// The OnMouseMove attribute specifies a script to be run when the mouse pointer is moving while it is over an element.
//
// This is a global types.Attribute.
func OnMouseMove(script string) types.Attribute {
return helpers.SingleAttribute("onmousemove", script)
}
// The OnMouseOut attribute specifies a script to be run when the mouse pointer moves out of an element.
//
// This is a global types.Attribute.
func OnMouseOut(script string) types.Attribute {
return helpers.SingleAttribute("onmouseout", script)
}
// The OnMouseOver attribute specifies a script to be run when the mouse pointer moves over an element.
//
// This is a global types.Attribute.
func OnMouseOver(script string) types.Attribute {
return helpers.SingleAttribute("onmouseover", script)
}
// The OnMouseUp attribute specifies a script to be run when a mouse button is released over an element.
//
// This is a global types.Attribute.
func OnMouseUp(script string) types.Attribute {
return helpers.SingleAttribute("onmouseup", script)
}
// The OnWheel attribute specifies a script to be run when the mouse wheel rolls up or down over an element.
//
// This is a global types.Attribute.
func OnWheel(script string) types.Attribute {
return helpers.SingleAttribute("onwheel", script)
}
// The OnDrag attribute specifies a script to be run when an element is dragged.
//
// This is a global types.Attribute.
func OnDrag(script string) types.Attribute {
return helpers.SingleAttribute("ondrag", script)
}
// The OnDragEnd attribute specifies a script to be run at the end of a drag operation.
//
// This is a global types.Attribute.
func OnDragEnd(script string) types.Attribute {
return helpers.SingleAttribute("ondragend", script)
}
// The OnDragEnter attribute specifies a script to be run when an element has been dragged to a valid drop target.
//
// This is a global types.Attribute.
func OnDragEnter(script string) types.Attribute {
return helpers.SingleAttribute("ondragenter", script)
}
// The OnDragLeave attribute specifies a script to be run when an element leaves a valid drop target.
//
// This is a global types.Attribute.
func OnDragLeave(script string) types.Attribute {
return helpers.SingleAttribute("ondragleave", script)
}
// The OnDragOver attribute specifies a script to be run when an element is being dragged over a valid drop target.
//
// This is a global types.Attribute.
func OnDragOver(script string) types.Attribute {
return helpers.SingleAttribute("ondragover", script)
}
// The OnDragStart attribute specifies a script to be run at the start of a drag operation.
//
// This is a global types.Attribute.
func OnDragStart(script string) types.Attribute {
return helpers.SingleAttribute("ondragstart", script)
}
// The OnDrop attribute specifies a script to be run when dragged element is being dropped.
//
// This is a global types.Attribute.
func OnDrop(script string) types.Attribute {
return helpers.SingleAttribute("ondrop", script)
}
// The OnScroll attribute specifies a script to be run when an element's scrollbar is being scrolled.
//
// This is a global types.Attribute.
func OnScroll(script string) types.Attribute {
return helpers.SingleAttribute("onscroll", script)
}
// The OnCopy attribute specifies a script to be run when the user copies the content of an element.
//
// This is a global types.Attribute.
func OnCopy(script string) types.Attribute {
return helpers.SingleAttribute("oncopy", script)
}
// The OnCut attribute specifies a script to be run when the user cuts the content of an element.
//
// This is a global types.Attribute.
func OnCut(script string) types.Attribute {
return helpers.SingleAttribute("oncut", script)
}
// The OnPaste attribute specifies a script to be run when the user pastes some content in an element.
//
// This is a global types.Attribute.
func OnPaste(script string) types.Attribute {
return helpers.SingleAttribute("onpaste", script)
}
// The OnAbort attribute specifies a script to be run on abort.
//
// This is a global types.Attribute.
func OnAbort(script string) types.Attribute {
return helpers.SingleAttribute("onabort", script)
}
// The OnCanPlay attribute specifies a script to be run when a file is ready to start playing.
//
// This is a global types.Attribute.
func OnCanPlay(script string) types.Attribute {
return helpers.SingleAttribute("oncanplay", script)
}
// The OnCanPlayThrough attribute specifies a script to be run when a file can be played all the way to the end without
// pausing for buffering.
//
// This is a global types.Attribute.
func OnCanPlayThrough(script string) types.Attribute {
return helpers.SingleAttribute("oncanplaythrough", script)
}
// The OnCueChange attribute specifies a script to be run when the cue changes in a Track element.
//
// This is a global types.Attribute.
func OnCueChange(script string) types.Attribute {
return helpers.SingleAttribute("oncuechange", script)
}
// The OnDurationChange attribute specifies a script to be run when the length of the media changes.
//
// This is a global types.Attribute.
func OnDurationChange(script string) types.Attribute {
return helpers.SingleAttribute("ondurationchange", script)
}
// The OnEmptied attribute specifies a script to be run when something bad happens and the file is suddenly unavailable.
//
// This is a global types.Attribute.
func OnEmptied(script string) types.Attribute {
return helpers.SingleAttribute("onemptied", script)
}
// The OnEnded attribute specifies a script to be run when the media has reach the end.
//
// This is a global types.Attribute.
func OnEnded(script string) types.Attribute {
return helpers.SingleAttribute("onended", script)
}
// The OnLoadedData attribute specifies a script to be run when media data is loaded.
//
// This is a global types.Attribute.
func OnLoadedData(script string) types.Attribute {
return helpers.SingleAttribute("onloadeddata", script)
}
// The OnLoadedMetaData attribute specifies a script to be run when meta data (like dimensions and duration) are loaded.
//
// This is a global types.Attribute.
func OnLoadedMetaData(script string) types.Attribute {
return helpers.SingleAttribute("onloadedmetadata", script)
}
// The OnLoadStart attribute specifies a script to be run just as the file begins to load before anything is actually loaded.
//
// This is a global types.Attribute.
func OnLoadStart(script string) types.Attribute {
return helpers.SingleAttribute("onloadstart", script)
}
// The OnPause attribute specifies a script to be run when the media is paused either by the user or programmatically.
//
// This is a global types.Attribute.
func OnPause(script string) types.Attribute {
return helpers.SingleAttribute("onpause", script)
}
// The OnPlay attribute specifies a script to be run when the media is ready to start playing.
//
// This is a global types.Attribute.
func OnPlay(script string) types.Attribute {
return helpers.SingleAttribute("onplay", script)
}
// The OnPlaying attribute specifies a script to be run when the media actually has started playing.
//
// This is a global types.Attribute.
func OnPlaying(script string) types.Attribute {
return helpers.SingleAttribute("onplaying", script)
}
// The OnProgress attribute specifies a script to be run when the browser is in the process of getting the media data.
//
// This is a global types.Attribute.
func OnProgress(script string) types.Attribute {
return helpers.SingleAttribute("onprogress", script)
}
// The OnRateChange attribute specifies a script to be run each time the playback rate changes.
//
// This is a global types.Attribute.
func OnRateChange(script string) types.Attribute {
return helpers.SingleAttribute("onratechange", script)
}
// The OnSeeked attribute specifies a script to be run when the seeking attribute is set to false indicating that seeking has ended.
//
// This is a global types.Attribute.
func OnSeeked(script string) types.Attribute {
return helpers.SingleAttribute("onseeked", script)
}
// The OnSeeking attribute specifies a script to be run when the seeking attribute is set to true indicating that seeking is active.
//
// This is a global types.Attribute.
func OnSeeking(script string) types.Attribute {
return helpers.SingleAttribute("onseeking", script)
}
// The OnStalled attribute specifies a script to be run when the browser is unable to fetch the media data for whatever reason.
//
// This is a global types.Attribute.
func OnStalled(script string) types.Attribute {
return helpers.SingleAttribute("onstalled", script)
}
// The OnSuspend attribute specifies a script to be run when fetching the media data is stopped before it is completely
// loaded for whatever reason.
//
// This is a global types.Attribute.
func OnSuspend(script string) types.Attribute {
return helpers.SingleAttribute("onsuspend", script)
}
// The OnTimeUpdate attribute specifies a script to be run when the playing position has changed.
//
// This is a global types.Attribute.
func OnTimeUpdate(script string) types.Attribute {
return helpers.SingleAttribute("ontimeupdate", script)
}
// The OnVolumeChange attribute specifies a script to be run each time the volume is changed which.
//
// This is a global types.Attribute.
func OnVolumeChange(script string) types.Attribute {
return helpers.SingleAttribute("onvolumechange", script)
}
// The OnWaiting attribute specifies a script to be run when the media has paused but is expected to resume.
//
// This is a global types.Attribute.
func OnWaiting(script string) types.Attribute {
return helpers.SingleAttribute("onwaiting", script)
}
// The OnToggle attribute specifies a script to be run when the user opens or closes the Details element.
//
// This is a global types.Attribute.
func OnToggle(script string) types.Attribute {
return helpers.SingleAttribute("ontoggle", script)
}
// The OnSubmit attribute specifies a script to be run when a Form is submitted.s
//
// This flag is allowed for:
// - Form
func OnSubmit(script string) types.Attribute {
return helpers.SingleAttribute("onsubmit", script)
}