happy-dom 7.3.0 → 7.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of happy-dom might be problematic. Click here for more details.
- package/lib/event/EventTarget.d.ts +14 -1
- package/lib/event/EventTarget.js +16 -1
- package/lib/event/EventTarget.js.map +1 -1
- package/lib/event/IEventTarget.d.ts +20 -0
- package/lib/event/NonImplementedEventTypes.js +2 -1
- package/lib/event/NonImplementedEventTypes.js.map +1 -1
- package/lib/fetch/IRequestInit.d.ts +1 -0
- package/lib/form-data/IFormData.d.ts +2 -0
- package/lib/nodes/document/Document.d.ts +109 -1
- package/lib/nodes/document/Document.js +110 -1
- package/lib/nodes/document/Document.js.map +1 -1
- package/lib/nodes/document/IDocument.d.ts +109 -1
- package/lib/nodes/element/Element.d.ts +35 -0
- package/lib/nodes/element/Element.js +35 -0
- package/lib/nodes/element/Element.js.map +1 -1
- package/lib/nodes/element/IElement.d.ts +35 -0
- package/lib/nodes/html-dialog-element/HTMLDialogElement.d.ts +3 -0
- package/lib/nodes/html-dialog-element/HTMLDialogElement.js +3 -0
- package/lib/nodes/html-dialog-element/HTMLDialogElement.js.map +1 -1
- package/lib/nodes/html-dialog-element/IHTMLDialogElement.d.ts +3 -0
- package/lib/nodes/html-element/HTMLElement.d.ts +26 -0
- package/lib/nodes/html-element/HTMLElement.js +26 -0
- package/lib/nodes/html-element/HTMLElement.js.map +1 -1
- package/lib/nodes/html-element/IHTMLElement.d.ts +26 -0
- package/lib/nodes/html-form-element/HTMLFormElement.d.ts +4 -0
- package/lib/nodes/html-form-element/HTMLFormElement.js +7 -0
- package/lib/nodes/html-form-element/HTMLFormElement.js.map +1 -1
- package/lib/nodes/html-form-element/IHTMLFormElement.d.ts +4 -0
- package/lib/nodes/html-input-element/HTMLInputElement.d.ts +4 -0
- package/lib/nodes/html-input-element/HTMLInputElement.js +4 -0
- package/lib/nodes/html-input-element/HTMLInputElement.js.map +1 -1
- package/lib/nodes/html-input-element/IHTMLInputElement.d.ts +4 -0
- package/lib/nodes/html-media-element/HTMLMediaElement.d.ts +23 -8
- package/lib/nodes/html-media-element/HTMLMediaElement.js +15 -0
- package/lib/nodes/html-media-element/HTMLMediaElement.js.map +1 -1
- package/lib/nodes/html-media-element/IHTMLMediaElement.d.ts +24 -0
- package/lib/nodes/html-select-element/HTMLSelectElement.d.ts +3 -0
- package/lib/nodes/html-select-element/HTMLSelectElement.js +3 -0
- package/lib/nodes/html-select-element/HTMLSelectElement.js.map +1 -1
- package/lib/nodes/html-select-element/IHTMLSelectElement.d.ts +3 -0
- package/lib/nodes/html-slot-element/HTMLSlotElement.d.ts +2 -0
- package/lib/nodes/html-slot-element/HTMLSlotElement.js +5 -0
- package/lib/nodes/html-slot-element/HTMLSlotElement.js.map +1 -1
- package/lib/nodes/html-slot-element/IHTMLSlotElement.d.ts +2 -0
- package/lib/nodes/html-text-area-element/HTMLTextAreaElement.d.ts +4 -1
- package/lib/nodes/html-text-area-element/HTMLTextAreaElement.js +4 -1
- package/lib/nodes/html-text-area-element/HTMLTextAreaElement.js.map +1 -1
- package/lib/nodes/html-text-area-element/IHTMLTextAreaElement.d.ts +3 -0
- package/lib/nodes/shadow-root/IShadowRoot.d.ts +2 -0
- package/lib/nodes/shadow-root/ShadowRoot.d.ts +2 -0
- package/lib/nodes/shadow-root/ShadowRoot.js +2 -0
- package/lib/nodes/shadow-root/ShadowRoot.js.map +1 -1
- package/lib/nodes/svg-element/ISVGElement.d.ts +7 -0
- package/lib/nodes/svg-element/ISVGSVGElement.d.ts +19 -0
- package/lib/nodes/svg-element/SVGElement.d.ts +7 -0
- package/lib/nodes/svg-element/SVGElement.js +7 -0
- package/lib/nodes/svg-element/SVGElement.js.map +1 -1
- package/lib/nodes/svg-element/SVGSVGElement.d.ts +19 -0
- package/lib/nodes/svg-element/SVGSVGElement.js +22 -0
- package/lib/nodes/svg-element/SVGSVGElement.js.map +1 -1
- package/lib/window/GlobalWindow.d.ts +2 -0
- package/lib/window/IWindow.d.ts +4 -0
- package/lib/window/Window.d.ts +3 -0
- package/package.json +2 -2
- package/src/event/EventTarget.ts +17 -1
- package/src/event/IEventTarget.ts +22 -0
- package/src/event/NonImplementedEventTypes.ts +2 -1
- package/src/nodes/document/Document.ts +111 -1
- package/src/nodes/document/IDocument.ts +111 -1
- package/src/nodes/element/Element.ts +37 -0
- package/src/nodes/element/IElement.ts +37 -0
- package/src/nodes/html-dialog-element/HTMLDialogElement.ts +4 -0
- package/src/nodes/html-dialog-element/IHTMLDialogElement.ts +5 -0
- package/src/nodes/html-element/HTMLElement.ts +28 -0
- package/src/nodes/html-element/IHTMLElement.ts +28 -0
- package/src/nodes/html-form-element/HTMLFormElement.ts +6 -0
- package/src/nodes/html-form-element/IHTMLFormElement.ts +6 -0
- package/src/nodes/html-input-element/HTMLInputElement.ts +5 -0
- package/src/nodes/html-input-element/IHTMLInputElement.ts +6 -0
- package/src/nodes/html-media-element/HTMLMediaElement.ts +23 -8
- package/src/nodes/html-media-element/IHTMLMediaElement.ts +26 -0
- package/src/nodes/html-select-element/HTMLSelectElement.ts +5 -0
- package/src/nodes/html-select-element/IHTMLSelectElement.ts +5 -0
- package/src/nodes/html-slot-element/HTMLSlotElement.ts +4 -0
- package/src/nodes/html-slot-element/IHTMLSlotElement.ts +4 -0
- package/src/nodes/html-text-area-element/HTMLTextAreaElement.ts +6 -1
- package/src/nodes/html-text-area-element/IHTMLTextAreaElement.ts +5 -0
- package/src/nodes/shadow-root/IShadowRoot.ts +4 -0
- package/src/nodes/shadow-root/ShadowRoot.ts +4 -0
- package/src/nodes/svg-element/ISVGElement.ts +9 -0
- package/src/nodes/svg-element/ISVGSVGElement.ts +21 -0
- package/src/nodes/svg-element/SVGElement.ts +9 -0
- package/src/nodes/svg-element/SVGSVGElement.ts +21 -0
@@ -51,7 +51,6 @@ const PROCESSING_INSTRUCTION_TARGET_REGEXP = /^[a-z][a-z0-9-]+$/;
|
|
51
51
|
*/
|
52
52
|
export default class Document extends Node implements IDocument {
|
53
53
|
public static _defaultView: IWindow = null;
|
54
|
-
public onreadystatechange: (event: Event) => void = null;
|
55
54
|
public nodeType = Node.DOCUMENT_NODE;
|
56
55
|
public adoptedStyleSheets: CSSStyleSheet[] = [];
|
57
56
|
public implementation: DOMImplementation;
|
@@ -66,6 +65,117 @@ export default class Document extends Node implements IDocument {
|
|
66
65
|
private _cookie = '';
|
67
66
|
private _selection: Selection = null;
|
68
67
|
|
68
|
+
// Events
|
69
|
+
public onreadystatechange: (event: Event) => void = null;
|
70
|
+
public onpointerlockchange: (event: Event) => void = null;
|
71
|
+
public onpointerlockerror: (event: Event) => void = null;
|
72
|
+
public onbeforecopy: (event: Event) => void = null;
|
73
|
+
public onbeforecut: (event: Event) => void = null;
|
74
|
+
public onbeforepaste: (event: Event) => void = null;
|
75
|
+
public onfreeze: (event: Event) => void = null;
|
76
|
+
public onresume: (event: Event) => void = null;
|
77
|
+
public onsearch: (event: Event) => void = null;
|
78
|
+
public onvisibilitychange: (event: Event) => void = null;
|
79
|
+
public onfullscreenchange: (event: Event) => void = null;
|
80
|
+
public onfullscreenerror: (event: Event) => void = null;
|
81
|
+
public onwebkitfullscreenchange: (event: Event) => void = null;
|
82
|
+
public onwebkitfullscreenerror: (event: Event) => void = null;
|
83
|
+
public onbeforexrselect: (event: Event) => void = null;
|
84
|
+
public onabort: (event: Event) => void = null;
|
85
|
+
public onbeforeinput: (event: Event) => void = null;
|
86
|
+
public onblur: (event: Event) => void = null;
|
87
|
+
public oncancel: (event: Event) => void = null;
|
88
|
+
public oncanplay: (event: Event) => void = null;
|
89
|
+
public oncanplaythrough: (event: Event) => void = null;
|
90
|
+
public onchange: (event: Event) => void = null;
|
91
|
+
public onclick: (event: Event) => void = null;
|
92
|
+
public onclose: (event: Event) => void = null;
|
93
|
+
public oncontextlost: (event: Event) => void = null;
|
94
|
+
public oncontextmenu: (event: Event) => void = null;
|
95
|
+
public oncontextrestored: (event: Event) => void = null;
|
96
|
+
public oncuechange: (event: Event) => void = null;
|
97
|
+
public ondblclick: (event: Event) => void = null;
|
98
|
+
public ondrag: (event: Event) => void = null;
|
99
|
+
public ondragend: (event: Event) => void = null;
|
100
|
+
public ondragenter: (event: Event) => void = null;
|
101
|
+
public ondragleave: (event: Event) => void = null;
|
102
|
+
public ondragover: (event: Event) => void = null;
|
103
|
+
public ondragstart: (event: Event) => void = null;
|
104
|
+
public ondrop: (event: Event) => void = null;
|
105
|
+
public ondurationchange: (event: Event) => void = null;
|
106
|
+
public onemptied: (event: Event) => void = null;
|
107
|
+
public onended: (event: Event) => void = null;
|
108
|
+
public onerror: (event: Event) => void = null;
|
109
|
+
public onfocus: (event: Event) => void = null;
|
110
|
+
public onformdata: (event: Event) => void = null;
|
111
|
+
public oninput: (event: Event) => void = null;
|
112
|
+
public oninvalid: (event: Event) => void = null;
|
113
|
+
public onkeydown: (event: Event) => void = null;
|
114
|
+
public onkeypress: (event: Event) => void = null;
|
115
|
+
public onkeyup: (event: Event) => void = null;
|
116
|
+
public onload: (event: Event) => void = null;
|
117
|
+
public onloadeddata: (event: Event) => void = null;
|
118
|
+
public onloadedmetadata: (event: Event) => void = null;
|
119
|
+
public onloadstart: (event: Event) => void = null;
|
120
|
+
public onmousedown: (event: Event) => void = null;
|
121
|
+
public onmouseenter: (event: Event) => void = null;
|
122
|
+
public onmouseleave: (event: Event) => void = null;
|
123
|
+
public onmousemove: (event: Event) => void = null;
|
124
|
+
public onmouseout: (event: Event) => void = null;
|
125
|
+
public onmouseover: (event: Event) => void = null;
|
126
|
+
public onmouseup: (event: Event) => void = null;
|
127
|
+
public onmousewheel: (event: Event) => void = null;
|
128
|
+
public onpause: (event: Event) => void = null;
|
129
|
+
public onplay: (event: Event) => void = null;
|
130
|
+
public onplaying: (event: Event) => void = null;
|
131
|
+
public onprogress: (event: Event) => void = null;
|
132
|
+
public onratechange: (event: Event) => void = null;
|
133
|
+
public onreset: (event: Event) => void = null;
|
134
|
+
public onresize: (event: Event) => void = null;
|
135
|
+
public onscroll: (event: Event) => void = null;
|
136
|
+
public onsecuritypolicyviolation: (event: Event) => void = null;
|
137
|
+
public onseeked: (event: Event) => void = null;
|
138
|
+
public onseeking: (event: Event) => void = null;
|
139
|
+
public onselect: (event: Event) => void = null;
|
140
|
+
public onslotchange: (event: Event) => void = null;
|
141
|
+
public onstalled: (event: Event) => void = null;
|
142
|
+
public onsubmit: (event: Event) => void = null;
|
143
|
+
public onsuspend: (event: Event) => void = null;
|
144
|
+
public ontimeupdate: (event: Event) => void = null;
|
145
|
+
public ontoggle: (event: Event) => void = null;
|
146
|
+
public onvolumechange: (event: Event) => void = null;
|
147
|
+
public onwaiting: (event: Event) => void = null;
|
148
|
+
public onwebkitanimationend: (event: Event) => void = null;
|
149
|
+
public onwebkitanimationiteration: (event: Event) => void = null;
|
150
|
+
public onwebkitanimationstart: (event: Event) => void = null;
|
151
|
+
public onwebkittransitionend: (event: Event) => void = null;
|
152
|
+
public onwheel: (event: Event) => void = null;
|
153
|
+
public onauxclick: (event: Event) => void = null;
|
154
|
+
public ongotpointercapture: (event: Event) => void = null;
|
155
|
+
public onlostpointercapture: (event: Event) => void = null;
|
156
|
+
public onpointerdown: (event: Event) => void = null;
|
157
|
+
public onpointermove: (event: Event) => void = null;
|
158
|
+
public onpointerrawupdate: (event: Event) => void = null;
|
159
|
+
public onpointerup: (event: Event) => void = null;
|
160
|
+
public onpointercancel: (event: Event) => void = null;
|
161
|
+
public onpointerover: (event: Event) => void = null;
|
162
|
+
public onpointerout: (event: Event) => void = null;
|
163
|
+
public onpointerenter: (event: Event) => void = null;
|
164
|
+
public onpointerleave: (event: Event) => void = null;
|
165
|
+
public onselectstart: (event: Event) => void = null;
|
166
|
+
public onselectionchange: (event: Event) => void = null;
|
167
|
+
public onanimationend: (event: Event) => void = null;
|
168
|
+
public onanimationiteration: (event: Event) => void = null;
|
169
|
+
public onanimationstart: (event: Event) => void = null;
|
170
|
+
public ontransitionrun: (event: Event) => void = null;
|
171
|
+
public ontransitionstart: (event: Event) => void = null;
|
172
|
+
public ontransitionend: (event: Event) => void = null;
|
173
|
+
public ontransitioncancel: (event: Event) => void = null;
|
174
|
+
public oncopy: (event: Event) => void = null;
|
175
|
+
public oncut: (event: Event) => void = null;
|
176
|
+
public onpaste: (event: Event) => void = null;
|
177
|
+
public onbeforematch: (event: Event) => void = null;
|
178
|
+
|
69
179
|
/**
|
70
180
|
* Creates an instance of Document.
|
71
181
|
*
|
@@ -25,7 +25,6 @@ import IProcessingInstruction from '../processing-instruction/IProcessingInstruc
|
|
25
25
|
* Document.
|
26
26
|
*/
|
27
27
|
export default interface IDocument extends IParentNode {
|
28
|
-
onreadystatechange: (event: Event) => void;
|
29
28
|
readonly defaultView: IWindow;
|
30
29
|
readonly implementation: DOMImplementation;
|
31
30
|
readonly documentElement: IHTMLElement;
|
@@ -42,6 +41,117 @@ export default interface IDocument extends IParentNode {
|
|
42
41
|
readonly characterSet: string;
|
43
42
|
cookie: string;
|
44
43
|
|
44
|
+
// Events
|
45
|
+
onreadystatechange: (event: Event) => void;
|
46
|
+
onpointerlockchange: (event: Event) => void;
|
47
|
+
onpointerlockerror: (event: Event) => void;
|
48
|
+
onbeforecopy: (event: Event) => void;
|
49
|
+
onbeforecut: (event: Event) => void;
|
50
|
+
onbeforepaste: (event: Event) => void;
|
51
|
+
onfreeze: (event: Event) => void;
|
52
|
+
onresume: (event: Event) => void;
|
53
|
+
onsearch: (event: Event) => void;
|
54
|
+
onvisibilitychange: (event: Event) => void;
|
55
|
+
onfullscreenchange: (event: Event) => void;
|
56
|
+
onfullscreenerror: (event: Event) => void;
|
57
|
+
onwebkitfullscreenchange: (event: Event) => void;
|
58
|
+
onwebkitfullscreenerror: (event: Event) => void;
|
59
|
+
onbeforexrselect: (event: Event) => void;
|
60
|
+
onabort: (event: Event) => void;
|
61
|
+
onbeforeinput: (event: Event) => void;
|
62
|
+
onblur: (event: Event) => void;
|
63
|
+
oncancel: (event: Event) => void;
|
64
|
+
oncanplay: (event: Event) => void;
|
65
|
+
oncanplaythrough: (event: Event) => void;
|
66
|
+
onchange: (event: Event) => void;
|
67
|
+
onclick: (event: Event) => void;
|
68
|
+
onclose: (event: Event) => void;
|
69
|
+
oncontextlost: (event: Event) => void;
|
70
|
+
oncontextmenu: (event: Event) => void;
|
71
|
+
oncontextrestored: (event: Event) => void;
|
72
|
+
oncuechange: (event: Event) => void;
|
73
|
+
ondblclick: (event: Event) => void;
|
74
|
+
ondrag: (event: Event) => void;
|
75
|
+
ondragend: (event: Event) => void;
|
76
|
+
ondragenter: (event: Event) => void;
|
77
|
+
ondragleave: (event: Event) => void;
|
78
|
+
ondragover: (event: Event) => void;
|
79
|
+
ondragstart: (event: Event) => void;
|
80
|
+
ondrop: (event: Event) => void;
|
81
|
+
ondurationchange: (event: Event) => void;
|
82
|
+
onemptied: (event: Event) => void;
|
83
|
+
onended: (event: Event) => void;
|
84
|
+
onerror: (event: Event) => void;
|
85
|
+
onfocus: (event: Event) => void;
|
86
|
+
onformdata: (event: Event) => void;
|
87
|
+
oninput: (event: Event) => void;
|
88
|
+
oninvalid: (event: Event) => void;
|
89
|
+
onkeydown: (event: Event) => void;
|
90
|
+
onkeypress: (event: Event) => void;
|
91
|
+
onkeyup: (event: Event) => void;
|
92
|
+
onload: (event: Event) => void;
|
93
|
+
onloadeddata: (event: Event) => void;
|
94
|
+
onloadedmetadata: (event: Event) => void;
|
95
|
+
onloadstart: (event: Event) => void;
|
96
|
+
onmousedown: (event: Event) => void;
|
97
|
+
onmouseenter: (event: Event) => void;
|
98
|
+
onmouseleave: (event: Event) => void;
|
99
|
+
onmousemove: (event: Event) => void;
|
100
|
+
onmouseout: (event: Event) => void;
|
101
|
+
onmouseover: (event: Event) => void;
|
102
|
+
onmouseup: (event: Event) => void;
|
103
|
+
onmousewheel: (event: Event) => void;
|
104
|
+
onpause: (event: Event) => void;
|
105
|
+
onplay: (event: Event) => void;
|
106
|
+
onplaying: (event: Event) => void;
|
107
|
+
onprogress: (event: Event) => void;
|
108
|
+
onratechange: (event: Event) => void;
|
109
|
+
onreset: (event: Event) => void;
|
110
|
+
onresize: (event: Event) => void;
|
111
|
+
onscroll: (event: Event) => void;
|
112
|
+
onsecuritypolicyviolation: (event: Event) => void;
|
113
|
+
onseeked: (event: Event) => void;
|
114
|
+
onseeking: (event: Event) => void;
|
115
|
+
onselect: (event: Event) => void;
|
116
|
+
onslotchange: (event: Event) => void;
|
117
|
+
onstalled: (event: Event) => void;
|
118
|
+
onsubmit: (event: Event) => void;
|
119
|
+
onsuspend: (event: Event) => void;
|
120
|
+
ontimeupdate: (event: Event) => void;
|
121
|
+
ontoggle: (event: Event) => void;
|
122
|
+
onvolumechange: (event: Event) => void;
|
123
|
+
onwaiting: (event: Event) => void;
|
124
|
+
onwebkitanimationend: (event: Event) => void;
|
125
|
+
onwebkitanimationiteration: (event: Event) => void;
|
126
|
+
onwebkitanimationstart: (event: Event) => void;
|
127
|
+
onwebkittransitionend: (event: Event) => void;
|
128
|
+
onwheel: (event: Event) => void;
|
129
|
+
onauxclick: (event: Event) => void;
|
130
|
+
ongotpointercapture: (event: Event) => void;
|
131
|
+
onlostpointercapture: (event: Event) => void;
|
132
|
+
onpointerdown: (event: Event) => void;
|
133
|
+
onpointermove: (event: Event) => void;
|
134
|
+
onpointerrawupdate: (event: Event) => void;
|
135
|
+
onpointerup: (event: Event) => void;
|
136
|
+
onpointercancel: (event: Event) => void;
|
137
|
+
onpointerover: (event: Event) => void;
|
138
|
+
onpointerout: (event: Event) => void;
|
139
|
+
onpointerenter: (event: Event) => void;
|
140
|
+
onpointerleave: (event: Event) => void;
|
141
|
+
onselectstart: (event: Event) => void;
|
142
|
+
onselectionchange: (event: Event) => void;
|
143
|
+
onanimationend: (event: Event) => void;
|
144
|
+
onanimationiteration: (event: Event) => void;
|
145
|
+
onanimationstart: (event: Event) => void;
|
146
|
+
ontransitionrun: (event: Event) => void;
|
147
|
+
ontransitionstart: (event: Event) => void;
|
148
|
+
ontransitionend: (event: Event) => void;
|
149
|
+
ontransitioncancel: (event: Event) => void;
|
150
|
+
oncopy: (event: Event) => void;
|
151
|
+
oncut: (event: Event) => void;
|
152
|
+
onpaste: (event: Event) => void;
|
153
|
+
onbeforematch: (event: Event) => void;
|
154
|
+
|
45
155
|
/**
|
46
156
|
* Replaces the document HTML with new HTML.
|
47
157
|
*
|
@@ -27,6 +27,7 @@ import IText from '../text/IText';
|
|
27
27
|
import IDOMRectList from './IDOMRectList';
|
28
28
|
import DOMRectListFactory from './DOMRectListFactory';
|
29
29
|
import IAttr from '../attr/IAttr';
|
30
|
+
import Event from '../../event/Event';
|
30
31
|
|
31
32
|
/**
|
32
33
|
* Element.
|
@@ -46,6 +47,42 @@ export default class Element extends Node implements IElement {
|
|
46
47
|
public children: IHTMLCollection<IElement> = HTMLCollectionFactory.create();
|
47
48
|
public readonly namespaceURI: string = null;
|
48
49
|
|
50
|
+
// Events
|
51
|
+
public oncancel: (event: Event) => void | null = null;
|
52
|
+
public onerror: (event: Event) => void | null = null;
|
53
|
+
public onscroll: (event: Event) => void | null = null;
|
54
|
+
public onselect: (event: Event) => void | null = null;
|
55
|
+
public onwheel: (event: Event) => void | null = null;
|
56
|
+
public oncopy: (event: Event) => void | null = null;
|
57
|
+
public oncut: (event: Event) => void | null = null;
|
58
|
+
public onpaste: (event: Event) => void | null = null;
|
59
|
+
public oncompositionend: (event: Event) => void | null = null;
|
60
|
+
public oncompositionstart: (event: Event) => void | null = null;
|
61
|
+
public oncompositionupdate: (event: Event) => void | null = null;
|
62
|
+
public onblur: (event: Event) => void | null = null;
|
63
|
+
public onfocus: (event: Event) => void | null = null;
|
64
|
+
public onfocusin: (event: Event) => void | null = null;
|
65
|
+
public onfocusout: (event: Event) => void | null = null;
|
66
|
+
public onfullscreenchange: (event: Event) => void | null = null;
|
67
|
+
public onfullscreenerror: (event: Event) => void | null = null;
|
68
|
+
public onkeydown: (event: Event) => void | null = null;
|
69
|
+
public onkeyup: (event: Event) => void | null = null;
|
70
|
+
public onauxclick: (event: Event) => void | null = null;
|
71
|
+
public onclick: (event: Event) => void | null = null;
|
72
|
+
public oncontextmenu: (event: Event) => void | null = null;
|
73
|
+
public ondblclick: (event: Event) => void | null = null;
|
74
|
+
public onmousedown: (event: Event) => void | null = null;
|
75
|
+
public onmouseenter: (event: Event) => void | null = null;
|
76
|
+
public onmouseleave: (event: Event) => void | null = null;
|
77
|
+
public onmousemove: (event: Event) => void | null = null;
|
78
|
+
public onmouseout: (event: Event) => void | null = null;
|
79
|
+
public onmouseover: (event: Event) => void | null = null;
|
80
|
+
public onmouseup: (event: Event) => void | null = null;
|
81
|
+
public ontouchcancel: (event: Event) => void | null = null;
|
82
|
+
public ontouchend: (event: Event) => void | null = null;
|
83
|
+
public ontouchmove: (event: Event) => void | null = null;
|
84
|
+
public ontouchstart: (event: Event) => void | null = null;
|
85
|
+
|
49
86
|
// Used for being able to access closed shadow roots
|
50
87
|
public _shadowRoot: IShadowRoot = null;
|
51
88
|
public _attributes: { [k: string]: IAttr } = {};
|
@@ -7,6 +7,7 @@ import IChildNode from '../child-node/IChildNode';
|
|
7
7
|
import IParentNode from '../parent-node/IParentNode';
|
8
8
|
import INonDocumentTypeChildNode from '../child-node/INonDocumentTypeChildNode';
|
9
9
|
import IDOMRectList from './IDOMRectList';
|
10
|
+
import Event from '../../event/Event';
|
10
11
|
|
11
12
|
export type TInsertAdjacentPositions = 'beforebegin' | 'afterbegin' | 'beforeend' | 'afterend';
|
12
13
|
|
@@ -30,6 +31,42 @@ export default interface IElement extends IChildNode, INonDocumentTypeChildNode,
|
|
30
31
|
readonly localName: string;
|
31
32
|
readonly attributes: { [k: string | number]: IAttr } & { length: number };
|
32
33
|
|
34
|
+
// Events
|
35
|
+
oncancel: (event: Event) => void | null;
|
36
|
+
onerror: (event: Event) => void | null;
|
37
|
+
onscroll: (event: Event) => void | null;
|
38
|
+
onselect: (event: Event) => void | null;
|
39
|
+
onwheel: (event: Event) => void | null;
|
40
|
+
oncopy: (event: Event) => void | null;
|
41
|
+
oncut: (event: Event) => void | null;
|
42
|
+
onpaste: (event: Event) => void | null;
|
43
|
+
oncompositionend: (event: Event) => void | null;
|
44
|
+
oncompositionstart: (event: Event) => void | null;
|
45
|
+
oncompositionupdate: (event: Event) => void | null;
|
46
|
+
onblur: (event: Event) => void | null;
|
47
|
+
onfocus: (event: Event) => void | null;
|
48
|
+
onfocusin: (event: Event) => void | null;
|
49
|
+
onfocusout: (event: Event) => void | null;
|
50
|
+
onfullscreenchange: (event: Event) => void | null;
|
51
|
+
onfullscreenerror: (event: Event) => void | null;
|
52
|
+
onkeydown: (event: Event) => void | null;
|
53
|
+
onkeyup: (event: Event) => void | null;
|
54
|
+
onauxclick: (event: Event) => void | null;
|
55
|
+
onclick: (event: Event) => void | null;
|
56
|
+
oncontextmenu: (event: Event) => void | null;
|
57
|
+
ondblclick: (event: Event) => void | null;
|
58
|
+
onmousedown: (event: Event) => void | null;
|
59
|
+
onmouseenter: (event: Event) => void | null;
|
60
|
+
onmouseleave: (event: Event) => void | null;
|
61
|
+
onmousemove: (event: Event) => void | null;
|
62
|
+
onmouseout: (event: Event) => void | null;
|
63
|
+
onmouseover: (event: Event) => void | null;
|
64
|
+
onmouseup: (event: Event) => void | null;
|
65
|
+
ontouchcancel: (event: Event) => void | null;
|
66
|
+
ontouchend: (event: Event) => void | null;
|
67
|
+
ontouchmove: (event: Event) => void | null;
|
68
|
+
ontouchstart: (event: Event) => void | null;
|
69
|
+
|
33
70
|
/**
|
34
71
|
* Attribute changed callback.
|
35
72
|
*
|
@@ -11,6 +11,10 @@ import IHTMLDialogElement from './IHTMLDialogElement';
|
|
11
11
|
export default class HTMLDialogElement extends HTMLElement implements IHTMLDialogElement {
|
12
12
|
public returnValue = '';
|
13
13
|
|
14
|
+
// Events
|
15
|
+
public oncancel: (event: Event) => void | null = null;
|
16
|
+
public onclose: (event: Event) => void | null = null;
|
17
|
+
|
14
18
|
/**
|
15
19
|
* Returns open.
|
16
20
|
*
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import Event from '../../event/Event';
|
1
2
|
import IHTMLElement from '../html-element/IHTMLElement';
|
2
3
|
|
3
4
|
/**
|
@@ -10,6 +11,10 @@ export default interface IHTMLDialogElement extends IHTMLElement {
|
|
10
11
|
open: boolean;
|
11
12
|
returnValue: string;
|
12
13
|
|
14
|
+
// Events
|
15
|
+
oncancel: (event: Event) => void | null;
|
16
|
+
onclose: (event: Event) => void | null;
|
17
|
+
|
13
18
|
/**
|
14
19
|
* Closes the dialog.
|
15
20
|
*
|
@@ -7,6 +7,7 @@ import PointerEvent from '../../event/events/PointerEvent';
|
|
7
7
|
import DatasetUtility from './DatasetUtility';
|
8
8
|
import NodeTypeEnum from '../node/NodeTypeEnum';
|
9
9
|
import DOMException from '../../exception/DOMException';
|
10
|
+
import Event from '../../event/Event';
|
10
11
|
|
11
12
|
/**
|
12
13
|
* HTML Element.
|
@@ -29,6 +30,33 @@ export default class HTMLElement extends Element implements IHTMLElement {
|
|
29
30
|
private _style: CSSStyleDeclaration = null;
|
30
31
|
private _dataset: { [key: string]: string } = null;
|
31
32
|
|
33
|
+
// Events
|
34
|
+
public oncopy: (event: Event) => void | null = null;
|
35
|
+
public oncut: (event: Event) => void | null = null;
|
36
|
+
public onpaste: (event: Event) => void | null = null;
|
37
|
+
public oninvalid: (event: Event) => void | null = null;
|
38
|
+
public onanimationcancel: (event: Event) => void | null = null;
|
39
|
+
public onanimationend: (event: Event) => void | null = null;
|
40
|
+
public onanimationiteration: (event: Event) => void | null = null;
|
41
|
+
public onanimationstart: (event: Event) => void | null = null;
|
42
|
+
public onbeforeinput: (event: Event) => void | null = null;
|
43
|
+
public oninput: (event: Event) => void | null = null;
|
44
|
+
public onchange: (event: Event) => void | null = null;
|
45
|
+
public ongotpointercapture: (event: Event) => void | null = null;
|
46
|
+
public onlostpointercapture: (event: Event) => void | null = null;
|
47
|
+
public onpointercancel: (event: Event) => void | null = null;
|
48
|
+
public onpointerdown: (event: Event) => void | null = null;
|
49
|
+
public onpointerenter: (event: Event) => void | null = null;
|
50
|
+
public onpointerleave: (event: Event) => void | null = null;
|
51
|
+
public onpointermove: (event: Event) => void | null = null;
|
52
|
+
public onpointerout: (event: Event) => void | null = null;
|
53
|
+
public onpointerover: (event: Event) => void | null = null;
|
54
|
+
public onpointerup: (event: Event) => void | null = null;
|
55
|
+
public ontransitioncancel: (event: Event) => void | null = null;
|
56
|
+
public ontransitionend: (event: Event) => void | null = null;
|
57
|
+
public ontransitionrun: (event: Event) => void | null = null;
|
58
|
+
public ontransitionstart: (event: Event) => void | null = null;
|
59
|
+
|
32
60
|
/**
|
33
61
|
* Returns tab index.
|
34
62
|
*
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import Event from '../../event/Event';
|
1
2
|
import CSSStyleDeclaration from '../../css/declaration/CSSStyleDeclaration';
|
2
3
|
import IElement from '../element/IElement';
|
3
4
|
|
@@ -20,6 +21,33 @@ export default interface IHTMLElement extends IElement {
|
|
20
21
|
innerText: string;
|
21
22
|
outerText: string;
|
22
23
|
|
24
|
+
// Events
|
25
|
+
oncopy: (event: Event) => void | null;
|
26
|
+
oncut: (event: Event) => void | null;
|
27
|
+
onpaste: (event: Event) => void | null;
|
28
|
+
oninvalid: (event: Event) => void | null;
|
29
|
+
onanimationcancel: (event: Event) => void | null;
|
30
|
+
onanimationend: (event: Event) => void | null;
|
31
|
+
onanimationiteration: (event: Event) => void | null;
|
32
|
+
onanimationstart: (event: Event) => void | null;
|
33
|
+
onbeforeinput: (event: Event) => void | null;
|
34
|
+
oninput: (event: Event) => void | null;
|
35
|
+
onchange: (event: Event) => void | null;
|
36
|
+
ongotpointercapture: (event: Event) => void | null;
|
37
|
+
onlostpointercapture: (event: Event) => void | null;
|
38
|
+
onpointercancel: (event: Event) => void | null;
|
39
|
+
onpointerdown: (event: Event) => void | null;
|
40
|
+
onpointerenter: (event: Event) => void | null;
|
41
|
+
onpointerleave: (event: Event) => void | null;
|
42
|
+
onpointermove: (event: Event) => void | null;
|
43
|
+
onpointerout: (event: Event) => void | null;
|
44
|
+
onpointerover: (event: Event) => void | null;
|
45
|
+
onpointerup: (event: Event) => void | null;
|
46
|
+
ontransitioncancel: (event: Event) => void | null;
|
47
|
+
ontransitionend: (event: Event) => void | null;
|
48
|
+
ontransitionrun: (event: Event) => void | null;
|
49
|
+
ontransitionstart: (event: Event) => void | null;
|
50
|
+
|
23
51
|
/**
|
24
52
|
* Triggers a click event.
|
25
53
|
*/
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import HTMLElement from '../html-element/HTMLElement';
|
2
2
|
import IElement from '../element/IElement';
|
3
3
|
import IHTMLFormElement from './IHTMLFormElement';
|
4
|
+
import Event from '../../event/Event';
|
4
5
|
|
5
6
|
/**
|
6
7
|
* HTML Form Element.
|
@@ -9,6 +10,11 @@ import IHTMLFormElement from './IHTMLFormElement';
|
|
9
10
|
* https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement.
|
10
11
|
*/
|
11
12
|
export default class HTMLFormElement extends HTMLElement implements IHTMLFormElement {
|
13
|
+
// Events
|
14
|
+
public onformdata: (event: Event) => void | null = null;
|
15
|
+
public onreset: (event: Event) => void | null = null;
|
16
|
+
public onsubmit: (event: Event) => void | null = null;
|
17
|
+
|
12
18
|
/**
|
13
19
|
* Returns name.
|
14
20
|
*
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import Event from '../../event/Event';
|
1
2
|
import IElement from '../element/IElement';
|
2
3
|
import IHTMLElement from '../html-element/IHTMLElement';
|
3
4
|
|
@@ -20,6 +21,11 @@ export default interface IHTMLFormElement extends IHTMLElement {
|
|
20
21
|
elements: IElement[];
|
21
22
|
length: number;
|
22
23
|
|
24
|
+
// Events
|
25
|
+
onformdata: (event: Event) => void | null;
|
26
|
+
onreset: (event: Event) => void | null;
|
27
|
+
onsubmit: (event: Event) => void | null;
|
28
|
+
|
23
29
|
/**
|
24
30
|
* Submits form.
|
25
31
|
*/
|
@@ -38,6 +38,11 @@ export default class HTMLInputElement extends HTMLElement implements IHTMLInputE
|
|
38
38
|
// Type specific: file
|
39
39
|
public files: File[] = [];
|
40
40
|
|
41
|
+
// Events
|
42
|
+
public oninput: (event: Event) => void | null = null;
|
43
|
+
public oninvalid: (event: Event) => void | null = null;
|
44
|
+
public onselectionchange: (event: Event) => void | null = null;
|
45
|
+
|
41
46
|
// Type specific: text/password/search/tel/url/week/month
|
42
47
|
private _selectionStart: number = null;
|
43
48
|
private _selectionEnd: number = null;
|
@@ -3,6 +3,7 @@ import IHTMLElement from '../html-element/IHTMLElement';
|
|
3
3
|
import IHTMLFormElement from '../html-form-element/IHTMLFormElement';
|
4
4
|
import HTMLInputElementSelectionModeEnum from './HTMLInputElementSelectionModeEnum';
|
5
5
|
import ValidityState from '../validity-state/ValidityState';
|
6
|
+
import Event from '../../event/Event';
|
6
7
|
|
7
8
|
/**
|
8
9
|
* HTML Input Element.
|
@@ -53,6 +54,11 @@ export default interface IHTMLInputElement extends IHTMLElement {
|
|
53
54
|
valueAsNumber: number;
|
54
55
|
validationMessage: string;
|
55
56
|
|
57
|
+
// Events
|
58
|
+
oninput: (event: Event) => void | null;
|
59
|
+
oninvalid: (event: Event) => void | null;
|
60
|
+
onselectionchange: (event: Event) => void | null;
|
61
|
+
|
56
62
|
/**
|
57
63
|
* Sets validation message.
|
58
64
|
*
|
@@ -44,14 +44,29 @@ export default class HTMLMediaElement extends HTMLElement implements IHTMLMediaE
|
|
44
44
|
public readonly played = getTimeRangeDummy();
|
45
45
|
|
46
46
|
// Events
|
47
|
-
public onabort: (event: Event) => void = null;
|
48
|
-
public oncanplay: (event: Event) => void = null;
|
49
|
-
public oncanplaythrough: (event: Event) => void = null;
|
50
|
-
public ondurationchange: (event: Event) => void = null;
|
51
|
-
public onemptied: (event: Event) => void = null;
|
52
|
-
public onended: (event: Event) => void = null;
|
53
|
-
public onerror: (event: ErrorEvent) => void = null;
|
54
|
-
public onloadeddata: (event: Event) => void = null;
|
47
|
+
public onabort: (event: Event) => void | null = null;
|
48
|
+
public oncanplay: (event: Event) => void | null = null;
|
49
|
+
public oncanplaythrough: (event: Event) => void | null = null;
|
50
|
+
public ondurationchange: (event: Event) => void | null = null;
|
51
|
+
public onemptied: (event: Event) => void | null = null;
|
52
|
+
public onended: (event: Event) => void | null = null;
|
53
|
+
public onerror: (event: ErrorEvent) => void | null = null;
|
54
|
+
public onloadeddata: (event: Event) => void | null = null;
|
55
|
+
public onloadedmetadata: (event: Event) => void | null = null;
|
56
|
+
public onloadstart: (event: Event) => void | null = null;
|
57
|
+
public onpause: (event: Event) => void | null = null;
|
58
|
+
public onplay: (event: Event) => void | null = null;
|
59
|
+
public onplaying: (event: Event) => void | null = null;
|
60
|
+
public onprogress: (event: Event) => void | null = null;
|
61
|
+
public onratechange: (event: Event) => void | null = null;
|
62
|
+
public onresize: (event: Event) => void | null = null;
|
63
|
+
public onseeked: (event: Event) => void | null = null;
|
64
|
+
public onseeking: (event: Event) => void | null = null;
|
65
|
+
public onstalled: (event: Event) => void | null = null;
|
66
|
+
public onsuspend: (event: Event) => void | null = null;
|
67
|
+
public ontimeupdate: (event: Event) => void | null = null;
|
68
|
+
public onvolumechange: (event: Event) => void | null = null;
|
69
|
+
public onwaiting: (event: Event) => void | null = null;
|
55
70
|
|
56
71
|
#volume = 1;
|
57
72
|
#paused = true;
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import Event from '../../event/Event';
|
1
2
|
import IHTMLElement from '../html-element/IHTMLElement';
|
2
3
|
|
3
4
|
/**
|
@@ -39,6 +40,31 @@ export default interface IHTMLMediaElement extends IHTMLElement {
|
|
39
40
|
src: string;
|
40
41
|
volume: number | string;
|
41
42
|
|
43
|
+
// Events
|
44
|
+
onabort: (event: Event) => void | null;
|
45
|
+
oncanplay: (event: Event) => void | null;
|
46
|
+
oncanplaythrough: (event: Event) => void | null;
|
47
|
+
ondurationchange: (event: Event) => void | null;
|
48
|
+
onemptied: (event: Event) => void | null;
|
49
|
+
onended: (event: Event) => void | null;
|
50
|
+
onerror: (event: Event) => void | null;
|
51
|
+
onloadeddata: (event: Event) => void | null;
|
52
|
+
onloadedmetadata: (event: Event) => void | null;
|
53
|
+
onloadstart: (event: Event) => void | null;
|
54
|
+
onpause: (event: Event) => void | null;
|
55
|
+
onplay: (event: Event) => void | null;
|
56
|
+
onplaying: (event: Event) => void | null;
|
57
|
+
onprogress: (event: Event) => void | null;
|
58
|
+
onratechange: (event: Event) => void | null;
|
59
|
+
onresize: (event: Event) => void | null;
|
60
|
+
onseeked: (event: Event) => void | null;
|
61
|
+
onseeking: (event: Event) => void | null;
|
62
|
+
onstalled: (event: Event) => void | null;
|
63
|
+
onsuspend: (event: Event) => void | null;
|
64
|
+
ontimeupdate: (event: Event) => void | null;
|
65
|
+
onvolumechange: (event: Event) => void | null;
|
66
|
+
onwaiting: (event: Event) => void | null;
|
67
|
+
|
42
68
|
/**
|
43
69
|
* A MediaStream object which can be used as a source for audio and/or video data by other media processing code,
|
44
70
|
* or as a source for WebRTC.
|
@@ -12,6 +12,7 @@ import IHTMLOptionsCollection from '../html-option-element/IHTMLOptionsCollectio
|
|
12
12
|
import INodeList from '../node/INodeList';
|
13
13
|
import HTMLSelectElementValueSanitizer from './HTMLSelectElementValueSanitizer';
|
14
14
|
import IHTMLSelectElement from './IHTMLSelectElement';
|
15
|
+
import Event from '../../event/Event';
|
15
16
|
|
16
17
|
/**
|
17
18
|
* HTML Select Element.
|
@@ -23,6 +24,10 @@ export default class HTMLSelectElement extends HTMLElement implements IHTMLSelec
|
|
23
24
|
public type: string;
|
24
25
|
public labels: INodeList<IHTMLLabelElement>;
|
25
26
|
|
27
|
+
// Events
|
28
|
+
public onchange: (event: Event) => void | null = null;
|
29
|
+
public oninput: (event: Event) => void | null = null;
|
30
|
+
|
26
31
|
public _value = null;
|
27
32
|
public _selectedIndex = -1;
|
28
33
|
public _options: IHTMLOptionsCollection = null;
|
@@ -4,6 +4,7 @@ import IHTMLLabelElement from '../html-label-element/IHTMLLabelElement';
|
|
4
4
|
import INodeList from '../node/INodeList';
|
5
5
|
import IHTMLOptionsCollection from '../html-option-element/IHTMLOptionsCollection';
|
6
6
|
import ValidityState from '../validity-state/ValidityState';
|
7
|
+
import Event from '../../event/Event';
|
7
8
|
|
8
9
|
/**
|
9
10
|
* HTML Select Element.
|
@@ -24,4 +25,8 @@ export default interface IHTMLSelectElement extends IHTMLElement {
|
|
24
25
|
willValidate: boolean;
|
25
26
|
name: string;
|
26
27
|
multiple: boolean;
|
28
|
+
|
29
|
+
// Events
|
30
|
+
onchange: (event: Event) => void | null;
|
31
|
+
oninput: (event: Event) => void | null;
|
27
32
|
}
|
@@ -4,6 +4,7 @@ import IHTMLSlotElement from './IHTMLSlotElement';
|
|
4
4
|
import IText from '../text/IText';
|
5
5
|
import IElement from '../element/IElement';
|
6
6
|
import INode from '../node/INode';
|
7
|
+
import Event from '../../event/Event';
|
7
8
|
|
8
9
|
/**
|
9
10
|
* HTML Slot Element.
|
@@ -12,6 +13,9 @@ import INode from '../node/INode';
|
|
12
13
|
* https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement.
|
13
14
|
*/
|
14
15
|
export default class HTMLSlotElement extends HTMLElement implements IHTMLSlotElement {
|
16
|
+
// Events
|
17
|
+
public onslotchange: (event: Event) => void | null = null;
|
18
|
+
|
15
19
|
/**
|
16
20
|
* Returns name.
|
17
21
|
*
|