@pixui-dev/pxw 0.1.26 → 0.1.27
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.
- package/config/pfbs.js +4 -1
- package/config/util.js +12 -9
- package/config/webpack.js +1 -1
- package/lib/h5es-types/v1.9.2/h5es.d.ts +1609 -1604
- package/lib/h5es-types/v3.5.0/h5es.d.ts +1721 -1717
- package/lib/h5es-types/v3.5.6/h5es.d.ts +1700 -1686
- package/lib/types/preact/jsx.d.ts +0 -1
- package/package.json +1 -1
- package/scripts/run-pxw.js +6 -0
|
@@ -1,1837 +1,1851 @@
|
|
|
1
1
|
/// <reference no-default-lib="true"/>
|
|
2
2
|
/// <reference lib="es2020" />
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
gen: readArg
|
|
6
|
-
*/
|
|
7
|
-
interface EventListener {
|
|
8
|
-
(evt: Event): void;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
/*pix
|
|
12
|
-
gen: binding
|
|
13
|
-
*/
|
|
14
|
-
/** EventTarget is a DOM interface implemented by objects that can receive events and may have listeners for them. */
|
|
15
|
-
interface EventTarget {
|
|
16
|
-
/**
|
|
17
|
-
* Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.
|
|
18
|
-
*
|
|
19
|
-
* The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
|
|
20
|
-
*/
|
|
21
|
-
addEventListener(type: string, listener: EventListener): void;
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
|
|
25
|
-
*/
|
|
26
|
-
dispatchEvent(event: Event): void;
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Removes the event listener in target's event listener list with the same type, callback, and options.
|
|
30
|
-
*/
|
|
31
|
-
removeEventListener(type: string, callback: EventListener): void;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/*pix
|
|
35
|
-
gen: binding
|
|
36
|
-
cpp-class: ElementEvent
|
|
37
|
-
*/
|
|
38
|
-
/** An event which takes place in the DOM. */
|
|
39
|
-
interface Event {
|
|
40
|
-
/**
|
|
41
|
-
* Returns the object to which event is dispatched (its target).
|
|
42
|
-
*/
|
|
43
|
-
readonly target: EventTarget | null;
|
|
44
|
-
/**
|
|
45
|
-
* Returns the object whose event listener's callback is currently being invoked.
|
|
46
|
-
*/
|
|
47
|
-
readonly currentTarget: EventTarget | null;
|
|
48
|
-
/**
|
|
49
|
-
* Returns the type of event, e.g. "click", "hashchange", or "submit".
|
|
50
|
-
*/
|
|
51
|
-
readonly type: string;
|
|
52
|
-
/** 和stopPropagation()效果一样,只是兼容老代码 */
|
|
53
|
-
cancelBubble: boolean;
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* When dispatched in a tree, invoking this method prevents event from reaching any objects other than the current object.
|
|
57
|
-
*/
|
|
58
|
-
stopPropagation(): void;
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Returns true if stopPropagation() was invoked successfully, and false otherwise.
|
|
62
|
-
*/
|
|
63
|
-
isPropagationStopped(): boolean;
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* If invoked when the cancelable attribute value is true, and while executing a listener for the event with passive set to false, signals to the operation that caused event to be dispatched that it needs to be canceled.
|
|
67
|
-
*/
|
|
68
|
-
preventDefault(): void;
|
|
69
|
-
|
|
70
|
-
initEvent(type: string, bubbles?: boolean, cancelable?: boolean): void;
|
|
71
|
-
/**
|
|
72
|
-
* MouseEvent: Take the target element as the origin
|
|
73
|
-
*/
|
|
74
|
-
readonly offsetX: number;
|
|
75
|
-
readonly offsetY: number;
|
|
76
|
-
/**
|
|
77
|
-
* MouseEvent: Take the upper left corner of the view as the origin
|
|
78
|
-
*/
|
|
79
|
-
readonly clientX: number;
|
|
80
|
-
readonly clientY: number;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
/*pix
|
|
84
|
-
gen: struct
|
|
85
|
-
*/
|
|
86
|
-
interface EventInit {
|
|
87
|
-
bubbles?: boolean;
|
|
88
|
-
cancelable?: boolean;
|
|
89
|
-
}
|
|
4
|
+
import 'preact'
|
|
90
5
|
|
|
91
|
-
|
|
92
|
-
// prototype: Event;
|
|
93
|
-
// new(target: EventTarget, type: string): Event;
|
|
94
|
-
// };
|
|
6
|
+
declare global {
|
|
95
7
|
|
|
96
|
-
/*pix
|
|
97
|
-
|
|
98
|
-
*/
|
|
99
|
-
interface
|
|
100
|
-
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
/*pix
|
|
104
|
-
gen: binding
|
|
105
|
-
*/
|
|
106
|
-
/** Simple user interface events. */
|
|
107
|
-
interface CustomEvent<T = any> extends Event {
|
|
108
|
-
readonly detail: T;
|
|
109
|
-
|
|
110
|
-
// initCustomEvent(type: string, bubbles?: boolean, cancelable?: boolean, detail?: T): void;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
declare let CustomEvent: {
|
|
114
|
-
prototype: CustomEvent;
|
|
115
|
-
new <T>(typeArg: string, eventInitDict?: CustomEventInit<T>): CustomEvent<T>;
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
/*pix
|
|
119
|
-
gen: binding
|
|
120
|
-
*/
|
|
121
|
-
/** Events providing information related to animations. */
|
|
122
|
-
interface AnimationEvent extends Event {
|
|
123
|
-
readonly name: string;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
/*pix
|
|
127
|
-
gen: binding
|
|
128
|
-
*/
|
|
129
|
-
/** Events providing information related to transitions. */
|
|
130
|
-
interface TransitionEvent extends Event {
|
|
131
|
-
readonly name: string;
|
|
132
|
-
}
|
|
8
|
+
/*pix
|
|
9
|
+
gen: readArg
|
|
10
|
+
*/
|
|
11
|
+
interface EventListener {
|
|
12
|
+
(evt: Event): void;
|
|
13
|
+
}
|
|
133
14
|
|
|
134
|
-
/*pix
|
|
135
|
-
|
|
136
|
-
*/
|
|
137
|
-
/**
|
|
138
|
-
interface
|
|
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
|
-
|
|
15
|
+
/*pix
|
|
16
|
+
gen: binding
|
|
17
|
+
*/
|
|
18
|
+
/** EventTarget is a DOM interface implemented by objects that can receive events and may have listeners for them. */
|
|
19
|
+
interface EventTarget {
|
|
20
|
+
/**
|
|
21
|
+
* Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.
|
|
22
|
+
*
|
|
23
|
+
* The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
|
|
24
|
+
*/
|
|
25
|
+
addEventListener(type: string, listener: EventListener): void;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
|
|
29
|
+
*/
|
|
30
|
+
dispatchEvent(event: Event): void;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Removes the event listener in target's event listener list with the same type, callback, and options.
|
|
34
|
+
*/
|
|
35
|
+
removeEventListener(type: string, callback: EventListener): void;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/*pix
|
|
39
|
+
gen: binding
|
|
40
|
+
cpp-class: ElementEvent
|
|
41
|
+
*/
|
|
42
|
+
/** An event which takes place in the DOM. */
|
|
43
|
+
interface Event {
|
|
44
|
+
/**
|
|
45
|
+
* Returns the object to which event is dispatched (its target).
|
|
46
|
+
*/
|
|
47
|
+
readonly target: EventTarget | null;
|
|
48
|
+
/**
|
|
49
|
+
* Returns the object whose event listener's callback is currently being invoked.
|
|
50
|
+
*/
|
|
51
|
+
readonly currentTarget: EventTarget | null;
|
|
52
|
+
/**
|
|
53
|
+
* Returns the type of event, e.g. "click", "hashchange", or "submit".
|
|
54
|
+
*/
|
|
55
|
+
readonly type: string;
|
|
56
|
+
/** 和stopPropagation()效果一样,只是兼容老代码 */
|
|
57
|
+
cancelBubble: boolean;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* When dispatched in a tree, invoking this method prevents event from reaching any objects other than the current object.
|
|
61
|
+
*/
|
|
62
|
+
stopPropagation(): void;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Returns true if stopPropagation() was invoked successfully, and false otherwise.
|
|
66
|
+
*/
|
|
67
|
+
isPropagationStopped(): boolean;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* If invoked when the cancelable attribute value is true, and while executing a listener for the event with passive set to false, signals to the operation that caused event to be dispatched that it needs to be canceled.
|
|
71
|
+
*/
|
|
72
|
+
preventDefault(): void;
|
|
73
|
+
|
|
74
|
+
initEvent(type: string, bubbles?: boolean, cancelable?: boolean): void;
|
|
75
|
+
/**
|
|
76
|
+
* MouseEvent: Take the target element as the origin
|
|
77
|
+
*/
|
|
78
|
+
readonly offsetX: number;
|
|
79
|
+
readonly offsetY: number;
|
|
80
|
+
/**
|
|
81
|
+
* MouseEvent: Take the upper left corner of the view as the origin
|
|
82
|
+
*/
|
|
83
|
+
readonly clientX: number;
|
|
84
|
+
readonly clientY: number;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/*pix
|
|
88
|
+
gen: struct
|
|
89
|
+
*/
|
|
90
|
+
interface EventInit {
|
|
91
|
+
bubbles?: boolean;
|
|
92
|
+
cancelable?: boolean;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// declare let Event: {
|
|
96
|
+
// prototype: Event;
|
|
97
|
+
// new(target: EventTarget, type: string): Event;
|
|
98
|
+
// };
|
|
99
|
+
|
|
100
|
+
/*pix
|
|
101
|
+
gen: struct
|
|
102
|
+
*/
|
|
103
|
+
interface CustomEventInit<T = any> {
|
|
104
|
+
detail?: T;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/*pix
|
|
108
|
+
gen: binding
|
|
109
|
+
*/
|
|
110
|
+
/** Simple user interface events. */
|
|
111
|
+
interface CustomEvent<T = any> extends Event {
|
|
112
|
+
readonly detail: T;
|
|
164
113
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
};
|
|
114
|
+
// initCustomEvent(type: string, bubbles?: boolean, cancelable?: boolean, detail?: T): void;
|
|
115
|
+
}
|
|
168
116
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
interface MouseMoveEvent extends Event {}
|
|
117
|
+
declare let CustomEvent: {
|
|
118
|
+
prototype: CustomEvent;
|
|
119
|
+
new <T>(typeArg: string, eventInitDict?: CustomEventInit<T>): CustomEvent<T>;
|
|
120
|
+
};
|
|
174
121
|
|
|
175
|
-
/*pix
|
|
122
|
+
/*pix
|
|
176
123
|
gen: binding
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
124
|
+
*/
|
|
125
|
+
/** Events providing information related to animations. */
|
|
126
|
+
interface AnimationEvent extends Event {
|
|
127
|
+
readonly name: string;
|
|
128
|
+
}
|
|
181
129
|
|
|
182
|
-
/*pix
|
|
130
|
+
/*pix
|
|
183
131
|
gen: binding
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
132
|
+
*/
|
|
133
|
+
/** Events providing information related to transitions. */
|
|
134
|
+
interface TransitionEvent extends Event {
|
|
135
|
+
readonly name: string;
|
|
136
|
+
}
|
|
188
137
|
|
|
189
|
-
/*pix
|
|
138
|
+
/*pix
|
|
190
139
|
gen: binding
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
140
|
+
*/
|
|
141
|
+
/** KeyboardEvent objects describe a user interaction with the keyboard; each event describes a single interaction between the user and a key (or combination of a key with modifier keys) on the keyboard. */
|
|
142
|
+
interface KeyboardEvent extends Event {
|
|
143
|
+
readonly keyCode: number;
|
|
144
|
+
readonly key: number;
|
|
145
|
+
readonly code: number;
|
|
146
|
+
readonly altKey: boolean;
|
|
147
|
+
readonly metaKey: boolean;
|
|
148
|
+
readonly ctrlKey: boolean;
|
|
149
|
+
readonly shiftKey: boolean;
|
|
150
|
+
hasHandled: boolean;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
declare let KeyboardEvent: {
|
|
154
|
+
prototype: KeyboardEvent;
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
/*pix
|
|
197
158
|
gen: binding
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
/*pix
|
|
159
|
+
*/
|
|
160
|
+
/** GamepadEvent objects describe a user interaction with the gamepad; each event describes a single interaction between the user and a key (or combination of a key with modifier keys) on the gamepad. */
|
|
161
|
+
interface GamepadEvent extends Event {
|
|
162
|
+
readonly key: number;
|
|
163
|
+
readonly index: number;
|
|
164
|
+
readonly axis: number;
|
|
165
|
+
readonly isDown: boolean;
|
|
166
|
+
hasHandled: boolean;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
declare let GamepadEvent: {
|
|
170
|
+
prototype: GamepadEvent;
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
/*pix
|
|
213
174
|
gen: binding
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
175
|
+
*/
|
|
176
|
+
/** Events providing information related to errors in scripts or in files. */
|
|
177
|
+
interface MouseMoveEvent extends Event {}
|
|
178
|
+
|
|
179
|
+
/*pix
|
|
180
|
+
gen: binding
|
|
181
|
+
*/
|
|
182
|
+
interface MouseUpEvent extends Event {
|
|
183
|
+
readonly button: number;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/*pix
|
|
187
|
+
gen: binding
|
|
188
|
+
*/
|
|
189
|
+
interface MouseDownEvent extends Event {
|
|
190
|
+
readonly button: number;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/*pix
|
|
194
|
+
gen: binding
|
|
195
|
+
*/
|
|
196
|
+
interface MouseClickEvent extends Event {
|
|
197
|
+
readonly button: number;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/*pix
|
|
201
|
+
gen: binding
|
|
202
|
+
*/
|
|
203
|
+
interface MouseDragEvent extends MouseMoveEvent {
|
|
204
|
+
readonly dragged: Node;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/*pix
|
|
222
208
|
gen: binding
|
|
223
|
-
|
|
224
|
-
interface
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
209
|
+
*/
|
|
210
|
+
interface WheelEvent extends Event {
|
|
211
|
+
readonly deltaX: number;
|
|
212
|
+
readonly deltaY: number;
|
|
213
|
+
readonly deltaZ: number;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/*pix
|
|
217
|
+
gen: binding
|
|
218
|
+
*/
|
|
219
|
+
interface InputStateEvent extends Event {
|
|
220
|
+
readonly state: string;
|
|
221
|
+
readonly start: number;
|
|
222
|
+
readonly end: number;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/*pix
|
|
226
|
+
gen: binding
|
|
227
|
+
*/
|
|
228
|
+
interface TextAreaStateEvent extends Event {
|
|
229
|
+
readonly state: string;
|
|
230
|
+
readonly startX: number;
|
|
231
|
+
readonly startY: number;
|
|
232
|
+
readonly endX: number;
|
|
233
|
+
readonly endY: number;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/*pix
|
|
237
|
+
gen: binding
|
|
238
|
+
*/
|
|
239
|
+
interface DataEvent extends Event {
|
|
240
|
+
data: any;
|
|
241
|
+
|
|
242
|
+
count: number;
|
|
243
|
+
|
|
244
|
+
readonly index: number;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/*pix
|
|
248
|
+
gen: binding
|
|
249
|
+
*/
|
|
250
|
+
interface ScrollEvent extends Event {}
|
|
251
|
+
|
|
252
|
+
/*pix
|
|
253
|
+
gen: binding
|
|
254
|
+
*/
|
|
255
|
+
interface TemplateLoadEvent extends Event {
|
|
256
|
+
readonly data: any;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/*pix
|
|
260
|
+
gen: binding
|
|
261
|
+
*/
|
|
262
|
+
interface WindowMessageEvent extends Event {
|
|
263
|
+
readonly data: string;
|
|
264
|
+
readonly source: EventTarget;
|
|
265
|
+
|
|
266
|
+
result: string;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/*pix
|
|
233
270
|
gen: binding
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
271
|
+
*/
|
|
272
|
+
/** Simple user interface events. */
|
|
273
|
+
interface UIEvent extends Event {}
|
|
274
|
+
|
|
275
|
+
/*pix
|
|
276
|
+
gen: binding
|
|
277
|
+
*/
|
|
278
|
+
interface MessageEvent extends Event {
|
|
279
|
+
readonly data: string;
|
|
280
|
+
readonly source: EventTarget;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/*pix
|
|
244
284
|
gen: binding
|
|
245
|
-
|
|
246
|
-
|
|
285
|
+
*/
|
|
286
|
+
/** Events providing information related to errors in scripts or in files. */
|
|
287
|
+
interface ErrorEvent extends Event {
|
|
288
|
+
readonly message: string;
|
|
289
|
+
}
|
|
247
290
|
|
|
248
|
-
/*pix
|
|
291
|
+
/*pix
|
|
249
292
|
gen: binding
|
|
250
|
-
|
|
251
|
-
interface
|
|
252
|
-
|
|
253
|
-
}
|
|
293
|
+
*/
|
|
294
|
+
interface InputEvent extends UIEvent {
|
|
295
|
+
readonly data: string | null;
|
|
296
|
+
}
|
|
254
297
|
|
|
255
|
-
/*pix
|
|
298
|
+
/*pix
|
|
256
299
|
gen: binding
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
*/
|
|
268
|
-
/** Simple user interface events. */
|
|
269
|
-
interface UIEvent extends Event {}
|
|
270
|
-
|
|
271
|
-
/*pix
|
|
300
|
+
*/
|
|
301
|
+
/** A single contact point on a touch-sensitive device. The contact point is commonly a finger or stylus and the device may be a touchscreen or trackpad. */
|
|
302
|
+
interface Touch {
|
|
303
|
+
readonly clientX: number;
|
|
304
|
+
readonly clientY: number;
|
|
305
|
+
readonly identifier: number;
|
|
306
|
+
readonly target: EventTarget;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
/*pix
|
|
272
310
|
gen: binding
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
/*pix
|
|
288
|
-
gen: binding
|
|
289
|
-
*/
|
|
290
|
-
interface InputEvent extends UIEvent {
|
|
291
|
-
readonly data: string | null;
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
/*pix
|
|
295
|
-
gen: binding
|
|
296
|
-
*/
|
|
297
|
-
/** A single contact point on a touch-sensitive device. The contact point is commonly a finger or stylus and the device may be a touchscreen or trackpad. */
|
|
298
|
-
interface Touch {
|
|
299
|
-
readonly clientX: number;
|
|
300
|
-
readonly clientY: number;
|
|
301
|
-
readonly identifier: number;
|
|
302
|
-
readonly target: EventTarget;
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
/*pix
|
|
306
|
-
gen: binding
|
|
307
|
-
*/
|
|
308
|
-
/** An event sent when the state of contacts with a touch-sensitive surface changes. This surface can be a touch screen or trackpad, for example. The event can describe one or more points of contact with the screen and includes support for detecting movement, addition and removal of contact points, and so forth. */
|
|
309
|
-
interface TouchEvent extends UIEvent {
|
|
310
|
-
readonly targetTouches: Touch[];
|
|
311
|
-
readonly touches: Touch[];
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
/*pix
|
|
315
|
-
gen: binding
|
|
316
|
-
cpp-precompile: BUILD_WITH_RLOTTIE
|
|
317
|
-
*/
|
|
318
|
-
interface LottieEvent<T extends EventTarget = EventTarget> extends Event {
|
|
319
|
-
readonly currentFrame: number;
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
/*pix
|
|
323
|
-
gen: binding
|
|
324
|
-
cpp-precompile: BUILD_WITH_PIXCEF
|
|
325
|
-
*/
|
|
326
|
-
interface CefLoadEvent<T extends EventTarget = EventTarget> extends Event {
|
|
327
|
-
readonly httpStatusCode: number;
|
|
328
|
-
readonly scrollWidth: number;
|
|
329
|
-
readonly scrollHeight: number;
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
/*pix
|
|
333
|
-
gen: binding
|
|
334
|
-
cpp-precompile: BUILD_WITH_PIXCEF
|
|
335
|
-
*/
|
|
336
|
-
interface CefErrorEvent<T extends EventTarget = EventTarget> extends Event {
|
|
337
|
-
readonly errorCode: number;
|
|
338
|
-
readonly url: string;
|
|
339
|
-
readonly message: string;
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
/*pix
|
|
343
|
-
gen: binding
|
|
344
|
-
cpp-precompile: BUILD_WITH_PIXCEF
|
|
345
|
-
*/
|
|
346
|
-
interface CefExecJSEvent<T extends EventTarget = EventTarget> extends Event {
|
|
347
|
-
readonly message: string;
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
/*pix
|
|
351
|
-
gen: binding
|
|
352
|
-
*/
|
|
353
|
-
interface SlotAttachmentScriptBinding {
|
|
354
|
-
readonly src: string;
|
|
355
|
-
readonly handle: number;
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
/*pix
|
|
359
|
-
gen: binding
|
|
360
|
-
*/
|
|
361
|
-
interface File {
|
|
362
|
-
readonly fullPath: string;
|
|
363
|
-
readonly name: string;
|
|
364
|
-
readonly type: string;
|
|
365
|
-
readonly size: number;
|
|
366
|
-
readonly lastModified: number;
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
/*pix
|
|
370
|
-
gen: binding
|
|
371
|
-
cpp-class: WebsocketCloseEvent
|
|
372
|
-
*/
|
|
373
|
-
/** A CloseEvent is sent to clients using WebSockets when the connection is closed. This is delivered to the listener indicated by the WebSocket object's onclose attribute. */
|
|
374
|
-
interface CloseEvent extends Event {
|
|
375
|
-
/**
|
|
376
|
-
* Returns the WebSocket connection close code provided by the server.
|
|
377
|
-
*/
|
|
378
|
-
readonly code: any;
|
|
379
|
-
/**
|
|
380
|
-
* Returns the WebSocket connection close reason provided by the server.
|
|
381
|
-
*/
|
|
382
|
-
readonly reason: any;
|
|
383
|
-
/**
|
|
384
|
-
* Returns true if the connection closed cleanly; false otherwise.
|
|
385
|
-
*/
|
|
386
|
-
readonly wasClean: any;
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
/*pix
|
|
390
|
-
gen: binding
|
|
391
|
-
cpp-class: WebsocketMsgEvent
|
|
392
|
-
*/
|
|
393
|
-
interface MsgEvent extends Event {
|
|
394
|
-
readonly data: any;
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
type instantEchoType = boolean;
|
|
398
|
-
|
|
399
|
-
interface WebSocketEventMap {
|
|
400
|
-
close: CloseEvent;
|
|
401
|
-
error: Event;
|
|
402
|
-
message: MsgEvent;
|
|
403
|
-
open: Event;
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
/*pix
|
|
407
|
-
gen: binding
|
|
408
|
-
*/
|
|
409
|
-
/** Provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection. */
|
|
410
|
-
interface WebSocket extends EventTarget {
|
|
411
|
-
instantEcho: instantEchoType;
|
|
412
|
-
/**
|
|
413
|
-
* Returns the state of the WebSocket object's connection. It can have the values described below.
|
|
414
|
-
*/
|
|
415
|
-
readonly readyState: number;
|
|
416
|
-
readonly CLOSED: number;
|
|
417
|
-
readonly CLOSING: number;
|
|
418
|
-
readonly CONNECTING: number;
|
|
419
|
-
readonly OPEN: number;
|
|
420
|
-
|
|
421
|
-
onclose: ((this: WebSocket, ev: CloseEvent) => any) | null;
|
|
422
|
-
onerror: ((this: WebSocket, ev: Event) => any) | null;
|
|
423
|
-
onmessage: ((this: WebSocket, ev: MsgEvent) => any) | null;
|
|
424
|
-
onopen: ((this: WebSocket, ev: Event) => any) | null;
|
|
425
|
-
|
|
426
|
-
/**
|
|
427
|
-
* Closes the WebSocket connection, optionally using code as the the WebSocket connection close code and reason as the the WebSocket connection close reason.
|
|
428
|
-
*/
|
|
429
|
-
close(code?: number, reason?: string): void;
|
|
430
|
-
/**
|
|
431
|
-
* Transmits data using the WebSocket connection. data can be a string, a Blob, an ArrayBuffer, or an ArrayBufferView.
|
|
432
|
-
*/
|
|
433
|
-
send(data: string | ArrayBufferLike | ArrayBufferView): void;
|
|
434
|
-
/**
|
|
435
|
-
* Receive network messages synchronously, for debugger use only.
|
|
436
|
-
*/
|
|
437
|
-
syncReceiveMsg(timeout?: number): string;
|
|
438
|
-
zip(data: any): void;
|
|
439
|
-
|
|
440
|
-
unzip(data: any): void;
|
|
441
|
-
|
|
442
|
-
addEventListener<K extends keyof WebSocketEventMap>(type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any): void;
|
|
443
|
-
|
|
444
|
-
removeEventListener<K extends keyof WebSocketEventMap>(type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any): void;
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
declare let WebSocket: {
|
|
448
|
-
prototype: WebSocket;
|
|
449
|
-
new (url: string, protocols?: string | string[]): WebSocket;
|
|
450
|
-
readonly CLOSED: number;
|
|
451
|
-
readonly CLOSING: number;
|
|
452
|
-
readonly CONNECTING: number;
|
|
453
|
-
readonly OPEN: number;
|
|
454
|
-
};
|
|
455
|
-
|
|
456
|
-
///////////////////////////////////////////////////////////
|
|
457
|
-
|
|
458
|
-
interface XMLHttpRequestEventMap extends XMLHttpRequestEventTargetEventMap {
|
|
459
|
-
readystatechange: Event;
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
type BufferSource = ArrayBufferView | ArrayBuffer;
|
|
463
|
-
type BodyInit = BufferSource | string;
|
|
464
|
-
type XMLHttpRequestResponseType = '' | 'arraybuffer' | 'blob' | 'document' | 'json' | 'text';
|
|
465
|
-
|
|
466
|
-
/*pix
|
|
467
|
-
gen: struct
|
|
468
|
-
convertor: toJS
|
|
469
|
-
*/
|
|
470
|
-
interface NetDebugMsg {
|
|
471
|
-
total_time?: number /* defaultValue:0.0 */;
|
|
472
|
-
namelookup_time?: number /* defaultValue:0.0 */;
|
|
473
|
-
connect_time?: number /* defaultValue:0.0 */;
|
|
474
|
-
appconnect_time?: number /* defaultValue:0.0 */;
|
|
475
|
-
pretransfer_time?: number /* defaultValue:0.0 */;
|
|
476
|
-
redirect_time?: number /* defaultValue:0.0 */;
|
|
477
|
-
start_transfer_time?: number /* defaultValue:0.0 */;
|
|
478
|
-
download_size?: number /* defaultValue:0.0 */;
|
|
479
|
-
upload_size?: number /* defaultValue:0.0 */;
|
|
480
|
-
req_size?: number /* defaultValue:0.0 */;
|
|
481
|
-
header_size?: number /* defaultValue:0.0 */;
|
|
482
|
-
speed_download?: number /* defaultValue:0.0 */;
|
|
483
|
-
speed_upload?: number /* defaultValue:0.0 */;
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
/*pix
|
|
487
|
-
gen: binding
|
|
488
|
-
*/
|
|
489
|
-
/** Use XMLHttpRequest (XHR) objects to interact with servers. You can retrieve data from a URL without having to do a full page refresh. This enables a Web page to update just part of a page without disrupting what the user is doing. */
|
|
490
|
-
interface XMLHttpRequest extends EventTarget {
|
|
491
|
-
readonly DONE: number /* value:4 */;
|
|
492
|
-
readonly LOADING: number /* value:3 */;
|
|
493
|
-
readonly HEADERS_RECEIVED: number /* value:2 */;
|
|
494
|
-
readonly OPENED: number /* value:1 */;
|
|
495
|
-
readonly UNSENT: number /* value:0 */;
|
|
496
|
-
/**
|
|
497
|
-
* Returns the associated XMLHttpRequestUpload object. It can be used to gather transmission information when data is transferred to a server.
|
|
498
|
-
*/
|
|
499
|
-
readonly upload: XMLHttpRequestUpload;
|
|
500
|
-
|
|
501
|
-
readonly status: number;
|
|
502
|
-
/**
|
|
503
|
-
* Returns the response's body.
|
|
504
|
-
*/
|
|
505
|
-
readonly response: any;
|
|
506
|
-
|
|
507
|
-
readonly statusText: string;
|
|
508
|
-
/**
|
|
509
|
-
* Returns client's state.
|
|
510
|
-
*/
|
|
511
|
-
readonly readyState: number;
|
|
512
|
-
/**
|
|
513
|
-
* Returns the text response.
|
|
514
|
-
*
|
|
515
|
-
* Throws an "InvalidStateError" DOMException if responseType is not the empty string or "text".
|
|
516
|
-
*/
|
|
517
|
-
readonly responseText: string;
|
|
518
|
-
|
|
519
|
-
readonly responseURL: string;
|
|
520
|
-
/**
|
|
521
|
-
* Can be set to a time in milliseconds. When set to a non-zero value will cause fetching to terminate after the given time has passed. When the time has passed, the request has not yet completed, and the synchronous flag is unset, a timeout event will then be dispatched, or a "TimeoutError" DOMException will be thrown otherwise (for the send() method).
|
|
522
|
-
*
|
|
523
|
-
* When set: throws an "InvalidAccessError" DOMException if the synchronous flag is set and current global object is a Window object.
|
|
524
|
-
*/
|
|
525
|
-
timeout: number;
|
|
526
|
-
/**
|
|
527
|
-
* Returns the response type.
|
|
528
|
-
*
|
|
529
|
-
* Can be set to change the response type. Values are: the empty string (default), "arraybuffer", "blob", "document", "json", and "text".
|
|
530
|
-
*
|
|
531
|
-
* When set: setting to "document" is ignored if current global object is not a Window object.
|
|
532
|
-
*
|
|
533
|
-
* When set: throws an "InvalidStateError" DOMException if state is loading or done.
|
|
534
|
-
*
|
|
535
|
-
* When set: throws an "InvalidAccessError" DOMException if the synchronous flag is set and current global object is a Window object.
|
|
536
|
-
*/
|
|
537
|
-
responseType: XMLHttpRequestResponseType;
|
|
538
|
-
/**
|
|
539
|
-
* Get Set xhr incrementalDataSize.
|
|
540
|
-
* default is 0, means do not call onincrementaldata
|
|
541
|
-
* if set 1024, then call onincrementaldata when recv data size over 1024B,
|
|
542
|
-
*/
|
|
543
|
-
incrementalDataSize: number;
|
|
544
|
-
|
|
545
|
-
onabort: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
|
|
546
|
-
onerror: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
|
|
547
|
-
onload: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
|
|
548
|
-
onloadend: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
|
|
549
|
-
onloadstart: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
|
|
550
|
-
onprogress: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
|
|
551
|
-
ontimeout: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
|
|
552
|
-
onreadystatechange: ((this: XMLHttpRequest, ev: Event) => any) | null;
|
|
553
|
-
onincrementaldata: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
|
|
554
|
-
|
|
555
|
-
/**
|
|
556
|
-
* Cancels any network activity.
|
|
557
|
-
*/
|
|
558
|
-
abort(): void;
|
|
559
|
-
|
|
560
|
-
getResponseHeader(name: string): string | null;
|
|
561
|
-
|
|
562
|
-
getAllResponseHeaders(): string;
|
|
563
|
-
|
|
564
|
-
/**
|
|
565
|
-
* Sets the request method, request URL, and synchronous flag.
|
|
566
|
-
*
|
|
567
|
-
* Throws a "SyntaxError" DOMException if either method is not a valid HTTP method or url cannot be parsed.
|
|
568
|
-
*
|
|
569
|
-
* Throws a "SecurityError" DOMException if method is a case-insensitive match for `CONNECT`, `TRACE`, or `TRACK`.
|
|
570
|
-
*
|
|
571
|
-
* Throws an "InvalidAccessError" DOMException if async is false, current global object is a Window object, and the timeout attribute is not zero or the responseType attribute is not the empty string.
|
|
572
|
-
*/
|
|
573
|
-
open(method: string, url: string, async: boolean, username?: string | null, password?: string | null): void;
|
|
574
|
-
|
|
575
|
-
/**
|
|
576
|
-
* Initiates the request. The body argument provides the request body, if any, and is ignored if the request method is GET or HEAD.
|
|
577
|
-
*
|
|
578
|
-
* Throws an "InvalidStateError" DOMException if either state is not opened or the send() flag is set.
|
|
579
|
-
*/
|
|
580
|
-
send(body?: BodyInit | null): void;
|
|
581
|
-
|
|
582
|
-
/**
|
|
583
|
-
* Combines a header in author request headers.
|
|
584
|
-
*
|
|
585
|
-
* Throws an "InvalidStateError" DOMException if either state is not opened or the send() flag is set.
|
|
586
|
-
*
|
|
587
|
-
* Throws a "SyntaxError" DOMException if name is not a header name or if value is not a header value.
|
|
588
|
-
*/
|
|
589
|
-
setRequestHeader(name: string, value: string): void;
|
|
590
|
-
|
|
591
|
-
/**
|
|
592
|
-
* Set xhr request to net debug mode
|
|
593
|
-
* Net stat will be saved after req finished
|
|
594
|
-
*/
|
|
595
|
-
setDebugMode(isDebug: boolean): void;
|
|
596
|
-
|
|
597
|
-
/**
|
|
598
|
-
* Return net stat to js
|
|
599
|
-
*/
|
|
600
|
-
getDebugMsg(): NetDebugMsg;
|
|
601
|
-
|
|
602
|
-
setCurlEasyOpt(opt: number, val: number): void;
|
|
603
|
-
setCurlHostAddress(hostAddress: string): void;
|
|
604
|
-
|
|
605
|
-
addEventListener<K extends keyof XMLHttpRequestEventMap>(type: K, listener: (this: XMLHttpRequest, ev: XMLHttpRequestEventMap[K]) => any): void;
|
|
606
|
-
|
|
607
|
-
removeEventListener<K extends keyof XMLHttpRequestEventMap>(type: K, listener: (this: XMLHttpRequest, ev: XMLHttpRequestEventMap[K]) => any): void;
|
|
608
|
-
}
|
|
609
|
-
|
|
610
|
-
declare let XMLHttpRequest: {
|
|
611
|
-
prototype: XMLHttpRequest;
|
|
612
|
-
new (): XMLHttpRequest;
|
|
613
|
-
readonly DONE: number;
|
|
614
|
-
readonly HEADERS_RECEIVED: number;
|
|
615
|
-
readonly LOADING: number;
|
|
616
|
-
readonly OPENED: number;
|
|
617
|
-
readonly UNSENT: number;
|
|
618
|
-
};
|
|
619
|
-
|
|
620
|
-
/*pix
|
|
621
|
-
gen: binding
|
|
622
|
-
cpp-class: XmlHttpRequestProgressEvent
|
|
623
|
-
*/
|
|
624
|
-
interface ProgressEvent<T extends EventTarget = EventTarget> extends Event {
|
|
625
|
-
readonly lengthComputable: boolean;
|
|
626
|
-
readonly loaded: number;
|
|
627
|
-
readonly total: number;
|
|
628
|
-
}
|
|
629
|
-
|
|
630
|
-
interface PopStateEvent<T extends EventTarget = EventTarget> extends Event {
|
|
631
|
-
readonly target: T | null;
|
|
632
|
-
readonly state: any;
|
|
633
|
-
}
|
|
634
|
-
|
|
635
|
-
interface XMLHttpRequestEventTargetEventMap {
|
|
636
|
-
abort: ProgressEvent<XMLHttpRequestEventTarget>;
|
|
637
|
-
error: ProgressEvent<XMLHttpRequestEventTarget>;
|
|
638
|
-
load: ProgressEvent<XMLHttpRequestEventTarget>;
|
|
639
|
-
loadend: ProgressEvent<XMLHttpRequestEventTarget>;
|
|
640
|
-
loadstart: ProgressEvent<XMLHttpRequestEventTarget>;
|
|
641
|
-
progress: ProgressEvent<XMLHttpRequestEventTarget>;
|
|
642
|
-
timeout: ProgressEvent<XMLHttpRequestEventTarget>;
|
|
643
|
-
}
|
|
644
|
-
|
|
645
|
-
interface XMLHttpRequestEventTarget extends EventTarget {
|
|
646
|
-
onabort: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
|
|
647
|
-
onerror: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
|
|
648
|
-
onload: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
|
|
649
|
-
onloadend: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
|
|
650
|
-
onloadstart: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
|
|
651
|
-
onprogress: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
|
|
652
|
-
ontimeout: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
|
|
653
|
-
|
|
654
|
-
addEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestEventTarget, ev: XMLHttpRequestEventTargetEventMap[K]) => any): void;
|
|
655
|
-
|
|
656
|
-
removeEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestEventTarget, ev: XMLHttpRequestEventTargetEventMap[K]) => any): void;
|
|
657
|
-
}
|
|
658
|
-
|
|
659
|
-
/*pix
|
|
660
|
-
gen: binding
|
|
661
|
-
*/
|
|
662
|
-
interface XMLHttpRequestUpload extends EventTarget {
|
|
663
|
-
onabort: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
|
|
664
|
-
onerror: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
|
|
665
|
-
onload: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
|
|
666
|
-
onloadend: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
|
|
667
|
-
onloadstart: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
|
|
668
|
-
onprogress: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
|
|
669
|
-
ontimeout: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
|
|
670
|
-
addEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestUpload, ev: XMLHttpRequestEventTargetEventMap[K]) => any): void;
|
|
671
|
-
|
|
672
|
-
removeEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestUpload, ev: XMLHttpRequestEventTargetEventMap[K]) => any): void;
|
|
673
|
-
}
|
|
674
|
-
|
|
675
|
-
/*pix
|
|
676
|
-
gen: binding
|
|
677
|
-
*/
|
|
678
|
-
interface XmlHttpRequestEvent {}
|
|
679
|
-
|
|
680
|
-
/*pix
|
|
681
|
-
gen: binding
|
|
682
|
-
*/
|
|
683
|
-
interface XmlHttpRequestErrorEvent {
|
|
684
|
-
message: string;
|
|
685
|
-
}
|
|
686
|
-
|
|
687
|
-
/*pix
|
|
688
|
-
gen: binding
|
|
689
|
-
cpp-class: DomRect
|
|
690
|
-
*/
|
|
691
|
-
interface DOMRect {
|
|
692
|
-
readonly height: number;
|
|
693
|
-
readonly width: number;
|
|
694
|
-
readonly x: number;
|
|
695
|
-
readonly y: number;
|
|
696
|
-
readonly left: number;
|
|
697
|
-
readonly top: number;
|
|
698
|
-
readonly right: number;
|
|
699
|
-
readonly bottom: number;
|
|
700
|
-
}
|
|
701
|
-
|
|
702
|
-
declare let DOMRect: {
|
|
703
|
-
prototype: DOMRect;
|
|
704
|
-
new (element: HTMLElement): DOMRect;
|
|
705
|
-
};
|
|
706
|
-
|
|
707
|
-
interface EventHandlersEventMap {
|
|
708
|
-
click: MouseClickEvent;
|
|
709
|
-
load: Event;
|
|
710
|
-
mousedown: MouseDownEvent;
|
|
711
|
-
mousemove: MouseMoveEvent;
|
|
712
|
-
mouseout: MouseMoveEvent;
|
|
713
|
-
mouseover: MouseMoveEvent;
|
|
714
|
-
mouseup: MouseUpEvent;
|
|
715
|
-
mouseleave: Event;
|
|
716
|
-
mouseenter: Event;
|
|
717
|
-
wheel: WheelEvent;
|
|
718
|
-
animationstart: AnimationEvent;
|
|
719
|
-
animationend: AnimationEvent;
|
|
720
|
-
animationiteration: AnimationEvent;
|
|
721
|
-
transitionstart: TransitionEvent;
|
|
722
|
-
transitionend: TransitionEvent;
|
|
723
|
-
drag: MouseDragEvent;
|
|
724
|
-
dragstart: MouseDragEvent;
|
|
725
|
-
dragend: MouseDragEvent;
|
|
726
|
-
dragenter: MouseDragEvent;
|
|
727
|
-
dragleave: MouseDragEvent;
|
|
728
|
-
dragover: MouseDragEvent;
|
|
729
|
-
drop: MouseDragEvent;
|
|
730
|
-
scroll: Event;
|
|
731
|
-
touchcancel: TouchEvent;
|
|
732
|
-
touchend: TouchEvent;
|
|
733
|
-
touchmove: TouchEvent;
|
|
734
|
-
touchstart: TouchEvent;
|
|
735
|
-
// 'change': Event;
|
|
736
|
-
// 'input': Event;
|
|
737
|
-
keydown: KeyboardEvent;
|
|
738
|
-
keypress: KeyboardEvent;
|
|
739
|
-
keyup: KeyboardEvent;
|
|
740
|
-
|
|
741
|
-
resize: Event;
|
|
742
|
-
}
|
|
743
|
-
|
|
744
|
-
interface EventHandlers {
|
|
745
|
-
onclick: ((this: EventHandlers, ev: MouseClickEvent) => any) | null;
|
|
746
|
-
onload: ((this: EventHandlers, ev: Event) => any) | null;
|
|
747
|
-
onerror: ((this: EventHandlers, ev: ErrorEvent) => any) | null;
|
|
748
|
-
onmousedown: ((this: EventHandlers, ev: MouseDownEvent) => any) | null;
|
|
749
|
-
onmousemove: ((this: EventHandlers, ev: MouseMoveEvent) => any) | null;
|
|
750
|
-
onmouseout: ((this: EventHandlers, ev: MouseMoveEvent) => any) | null;
|
|
751
|
-
onmouseover: ((this: EventHandlers, ev: MouseMoveEvent) => any) | null;
|
|
752
|
-
onmouseup: ((this: EventHandlers, ev: MouseUpEvent) => any) | null;
|
|
753
|
-
onmouseleave: ((this: EventHandlers, ev: Event) => any) | null;
|
|
754
|
-
onmouseenter: ((this: EventHandlers, ev: Event) => any) | null;
|
|
755
|
-
onwheel: ((this: EventHandlers, ev: WheelEvent) => any) | null;
|
|
756
|
-
|
|
757
|
-
onanimationstart: ((this: EventHandlers, ev: AnimationEvent) => any) | null;
|
|
758
|
-
onanimationend: ((this: EventHandlers, ev: AnimationEvent) => any) | null;
|
|
759
|
-
onanimationiteration: ((this: EventHandlers, ev: AnimationEvent) => any) | null;
|
|
760
|
-
ontransitionstart: ((this: EventHandlers, ev: TransitionEvent) => any) | null;
|
|
761
|
-
ontransitionend: ((this: EventHandlers, ev: TransitionEvent) => any) | null;
|
|
762
|
-
|
|
763
|
-
ondrag: ((this: EventHandlers, ev: MouseDragEvent) => any) | null;
|
|
764
|
-
ondragstart: ((this: EventHandlers, ev: MouseDragEvent) => any) | null;
|
|
765
|
-
ondragend: ((this: EventHandlers, ev: MouseDragEvent) => any) | null;
|
|
766
|
-
ondragenter: ((this: EventHandlers, ev: MouseDragEvent) => any) | null;
|
|
767
|
-
ondragleave: ((this: EventHandlers, ev: MouseDragEvent) => any) | null;
|
|
768
|
-
ondragover: ((this: EventHandlers, ev: MouseDragEvent) => any) | null;
|
|
769
|
-
ondrop: ((this: EventHandlers, ev: MouseDragEvent) => any) | null;
|
|
770
|
-
|
|
771
|
-
onscroll: ((this: EventHandlers, ev: Event) => any) | null;
|
|
772
|
-
|
|
773
|
-
ontouchcancel?: ((this: EventHandlers, ev: TouchEvent) => any) | null;
|
|
774
|
-
ontouchend?: ((this: EventHandlers, ev: TouchEvent) => any) | null;
|
|
775
|
-
ontouchmove?: ((this: EventHandlers, ev: TouchEvent) => any) | null;
|
|
776
|
-
ontouchstart?: ((this: EventHandlers, ev: TouchEvent) => any) | null;
|
|
777
|
-
|
|
778
|
-
// onchange: ((this: EventHandlers, ev: Event) => any) | null;
|
|
779
|
-
// oninput: ((this: EventHandlers, ev: Event) => any) | null;
|
|
780
|
-
onkeydown: ((this: EventHandlers, ev: KeyboardEvent) => any) | null;
|
|
781
|
-
onkeypress: ((this: EventHandlers, ev: KeyboardEvent) => any) | null;
|
|
782
|
-
onkeyup: ((this: EventHandlers, ev: KeyboardEvent) => any) | null;
|
|
783
|
-
}
|
|
784
|
-
|
|
785
|
-
/*pix
|
|
786
|
-
gen: struct
|
|
787
|
-
convertor: toJS
|
|
788
|
-
*/
|
|
789
|
-
interface Attr {
|
|
790
|
-
name: string;
|
|
791
|
-
value: string;
|
|
792
|
-
}
|
|
793
|
-
|
|
794
|
-
/*pix
|
|
795
|
-
gen: binding
|
|
796
|
-
cpp-class: H5Element
|
|
797
|
-
*/
|
|
798
|
-
interface Node extends EventTarget {
|
|
799
|
-
id: string;
|
|
800
|
-
readonly localName: string;
|
|
801
|
-
readonly tagName: string;
|
|
802
|
-
readonly nodeType: number;
|
|
803
|
-
readonly nodeName: string;
|
|
804
|
-
readonly ownerDocument: Document;
|
|
805
|
-
readonly parentNode?: HTMLElement;
|
|
806
|
-
readonly nextSibling?: NodeOrHTMLElement;
|
|
807
|
-
/**
|
|
808
|
-
* Returns element's first attribute whose qualified name is qualifiedName, and null if there is no such attribute otherwise.
|
|
809
|
-
*/
|
|
810
|
-
getAttribute(qualifiedName: string): string | null;
|
|
811
|
-
|
|
812
|
-
/**
|
|
813
|
-
* Returns true if element has an attribute whose qualified name is qualifiedName, and false otherwise.
|
|
814
|
-
*/
|
|
815
|
-
hasAttribute(qualifiedName: string): boolean;
|
|
816
|
-
|
|
817
|
-
/**
|
|
818
|
-
* Removes element's first attribute whose qualified name is qualifiedName.
|
|
819
|
-
*/
|
|
820
|
-
removeAttribute(qualifiedName: string): void;
|
|
821
|
-
|
|
822
|
-
/**
|
|
823
|
-
* Sets the value of element's first attribute whose qualified name is qualifiedName to value.
|
|
824
|
-
*/
|
|
825
|
-
setAttribute(qualifiedName: string, value: string): void;
|
|
826
|
-
|
|
827
|
-
className: string;
|
|
828
|
-
readonly attributes: Attr[];
|
|
829
|
-
textContent: string | null;
|
|
830
|
-
focus(): void;
|
|
831
|
-
blur(): void;
|
|
832
|
-
}
|
|
833
|
-
|
|
834
|
-
/*pix
|
|
835
|
-
gen: binding
|
|
836
|
-
cpp-class: H5ElementText
|
|
837
|
-
*/
|
|
838
|
-
/** The textual content of Element or Attr. If an element has no markup within its content, it has a single child implementing Text that contains the element's text. However, if the element contains markup, it is parsed into information items and Text nodes that form its children. */
|
|
839
|
-
interface Text extends Node {
|
|
840
|
-
data: string;
|
|
841
|
-
nodeValue: string;
|
|
842
|
-
}
|
|
843
|
-
|
|
844
|
-
/*pix
|
|
845
|
-
gen: binding
|
|
846
|
-
cpp-class: MediaError
|
|
847
|
-
*/
|
|
848
|
-
interface MediaError {
|
|
849
|
-
readonly message: string;
|
|
850
|
-
readonly code: number;
|
|
851
|
-
}
|
|
852
|
-
|
|
853
|
-
/*pix
|
|
854
|
-
gen: binding
|
|
855
|
-
cpp-class: H5ElementAudio
|
|
856
|
-
with-handlers: AudioEventHandlers
|
|
857
|
-
*/
|
|
858
|
-
interface HTMLAudioElement extends HTMLElement {
|
|
859
|
-
src: string;
|
|
860
|
-
loop: boolean;
|
|
861
|
-
currentTime: number;
|
|
862
|
-
muted: boolean;
|
|
863
|
-
readonly duration: number;
|
|
864
|
-
playbackRate: number;
|
|
865
|
-
autoPlay: boolean;
|
|
866
|
-
volume: number;
|
|
867
|
-
autoPauseOnBacked: boolean;
|
|
868
|
-
readonly error: MediaError;
|
|
869
|
-
preload: boolean;
|
|
870
|
-
|
|
871
|
-
play(): void;
|
|
872
|
-
|
|
873
|
-
pause(): void;
|
|
874
|
-
|
|
875
|
-
resume(): void;
|
|
876
|
-
|
|
877
|
-
seek(second: number): void;
|
|
878
|
-
|
|
879
|
-
stop(): void;
|
|
880
|
-
|
|
881
|
-
load(): void;
|
|
882
|
-
|
|
883
|
-
canPlayType(format: string): string;
|
|
884
|
-
|
|
885
|
-
addEventListener<K extends keyof AudioEventHandlersEventMap>(type: K, listener: (this: HTMLAudioElement, ev: AudioEventHandlersEventMap[K]) => any): void;
|
|
886
|
-
|
|
887
|
-
removeEventListener<K extends keyof AudioEventHandlersEventMap>(type: K, listener: (this: HTMLAudioElement, ev: AudioEventHandlersEventMap[K]) => any): void;
|
|
888
|
-
}
|
|
889
|
-
|
|
890
|
-
/*pix
|
|
891
|
-
gen: binding
|
|
892
|
-
cpp-class: H5ElementVideo
|
|
893
|
-
with-handlers: VideoEventHandlers
|
|
894
|
-
*/
|
|
895
|
-
interface HTMLVideoElement extends HTMLAudioElement {
|
|
896
|
-
poster: string;
|
|
897
|
-
|
|
898
|
-
addEventListener<K extends keyof VideoEventHandlersEventMap>(type: K, listener: (this: HTMLVideoElement, ev: VideoEventHandlersEventMap[K]) => any): void;
|
|
899
|
-
|
|
900
|
-
removeEventListener<K extends keyof VideoEventHandlersEventMap>(type: K, listener: (this: HTMLVideoElement, ev: VideoEventHandlersEventMap[K]) => any): void;
|
|
901
|
-
}
|
|
902
|
-
|
|
903
|
-
/*pix
|
|
904
|
-
gen: binding
|
|
905
|
-
cpp-class: PxLibCustomValue
|
|
906
|
-
*/
|
|
907
|
-
interface PxLibCustomValue extends EventTarget {
|
|
908
|
-
isNull(): boolean;
|
|
909
|
-
|
|
910
|
-
libName(): string;
|
|
911
|
-
}
|
|
912
|
-
|
|
913
|
-
/*pix
|
|
914
|
-
gen: binding
|
|
915
|
-
cpp-class: RenderingContext
|
|
916
|
-
*/
|
|
917
|
-
interface CanvasRenderingContext2D extends HTMLElement {
|
|
918
|
-
lineWidth: number;
|
|
919
|
-
fillStyle: string;
|
|
920
|
-
strokeStyle: string;
|
|
921
|
-
font: string;
|
|
922
|
-
lineCap: string;
|
|
923
|
-
lineJoin: string;
|
|
924
|
-
textAlign: string;
|
|
925
|
-
textBaseline: string;
|
|
926
|
-
canvas: HTMLCanvasElement;
|
|
927
|
-
|
|
928
|
-
beginPath(): void;
|
|
929
|
-
|
|
930
|
-
closePath(): void;
|
|
931
|
-
|
|
932
|
-
moveTo(x: number, y: number): void;
|
|
933
|
-
|
|
934
|
-
lineTo(x: number, y: number): void;
|
|
935
|
-
|
|
936
|
-
stroke(): void;
|
|
937
|
-
|
|
938
|
-
fill(): void;
|
|
939
|
-
|
|
940
|
-
arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise: number): void;
|
|
941
|
-
|
|
942
|
-
arcTo(fromX: number, fromY: number, toX: number, toY: number, radius: number): void;
|
|
943
|
-
|
|
944
|
-
strokeRect(x: number, y: number, w: number, h: number): void;
|
|
945
|
-
|
|
946
|
-
fillRect(x: number, y: number, w: number, h: number): void;
|
|
947
|
-
|
|
948
|
-
clearRect(x: number, y: number, w: number, h: number): void;
|
|
311
|
+
*/
|
|
312
|
+
/** An event sent when the state of contacts with a touch-sensitive surface changes. This surface can be a touch screen or trackpad, for example. The event can describe one or more points of contact with the screen and includes support for detecting movement, addition and removal of contact points, and so forth. */
|
|
313
|
+
interface TouchEvent extends UIEvent {
|
|
314
|
+
readonly targetTouches: Touch[];
|
|
315
|
+
readonly touches: Touch[];
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/*pix
|
|
319
|
+
gen: binding
|
|
320
|
+
cpp-precompile: BUILD_WITH_RLOTTIE
|
|
321
|
+
*/
|
|
322
|
+
interface LottieEvent<T extends EventTarget = EventTarget> extends Event {
|
|
323
|
+
readonly currentFrame: number;
|
|
324
|
+
}
|
|
949
325
|
|
|
950
|
-
|
|
326
|
+
/*pix
|
|
327
|
+
gen: binding
|
|
328
|
+
cpp-precompile: BUILD_WITH_PIXCEF
|
|
329
|
+
*/
|
|
330
|
+
interface CefLoadEvent<T extends EventTarget = EventTarget> extends Event {
|
|
331
|
+
readonly httpStatusCode: number;
|
|
332
|
+
readonly scrollWidth: number;
|
|
333
|
+
readonly scrollHeight: number;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
/*pix
|
|
337
|
+
gen: binding
|
|
338
|
+
cpp-precompile: BUILD_WITH_PIXCEF
|
|
339
|
+
*/
|
|
340
|
+
interface CefErrorEvent<T extends EventTarget = EventTarget> extends Event {
|
|
341
|
+
readonly errorCode: number;
|
|
342
|
+
readonly url: string;
|
|
343
|
+
readonly message: string;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
/*pix
|
|
347
|
+
gen: binding
|
|
348
|
+
cpp-precompile: BUILD_WITH_PIXCEF
|
|
349
|
+
*/
|
|
350
|
+
interface CefExecJSEvent<T extends EventTarget = EventTarget> extends Event {
|
|
351
|
+
readonly message: string;
|
|
352
|
+
}
|
|
951
353
|
|
|
952
|
-
|
|
354
|
+
/*pix
|
|
355
|
+
gen: binding
|
|
356
|
+
*/
|
|
357
|
+
interface SlotAttachmentScriptBinding {
|
|
358
|
+
readonly src: string;
|
|
359
|
+
readonly handle: number;
|
|
360
|
+
}
|
|
953
361
|
|
|
954
|
-
|
|
362
|
+
/*pix
|
|
363
|
+
gen: binding
|
|
364
|
+
*/
|
|
365
|
+
interface File {
|
|
366
|
+
readonly fullPath: string;
|
|
367
|
+
readonly name: string;
|
|
368
|
+
readonly type: string;
|
|
369
|
+
readonly size: number;
|
|
370
|
+
readonly lastModified: number;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
/*pix
|
|
374
|
+
gen: binding
|
|
375
|
+
cpp-class: WebsocketCloseEvent
|
|
376
|
+
*/
|
|
377
|
+
/** A CloseEvent is sent to clients using WebSockets when the connection is closed. This is delivered to the listener indicated by the WebSocket object's onclose attribute. */
|
|
378
|
+
interface CloseEvent extends Event {
|
|
379
|
+
/**
|
|
380
|
+
* Returns the WebSocket connection close code provided by the server.
|
|
381
|
+
*/
|
|
382
|
+
readonly code: any;
|
|
383
|
+
/**
|
|
384
|
+
* Returns the WebSocket connection close reason provided by the server.
|
|
385
|
+
*/
|
|
386
|
+
readonly reason: any;
|
|
387
|
+
/**
|
|
388
|
+
* Returns true if the connection closed cleanly; false otherwise.
|
|
389
|
+
*/
|
|
390
|
+
readonly wasClean: any;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
/*pix
|
|
394
|
+
gen: binding
|
|
395
|
+
cpp-class: WebsocketMsgEvent
|
|
396
|
+
*/
|
|
397
|
+
interface MsgEvent extends Event {
|
|
398
|
+
readonly data: any;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
type instantEchoType = boolean;
|
|
402
|
+
|
|
403
|
+
interface WebSocketEventMap {
|
|
404
|
+
close: CloseEvent;
|
|
405
|
+
error: Event;
|
|
406
|
+
message: MsgEvent;
|
|
407
|
+
open: Event;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
/*pix
|
|
411
|
+
gen: binding
|
|
412
|
+
*/
|
|
413
|
+
/** Provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection. */
|
|
414
|
+
interface WebSocket extends EventTarget {
|
|
415
|
+
instantEcho: instantEchoType;
|
|
416
|
+
/**
|
|
417
|
+
* Returns the state of the WebSocket object's connection. It can have the values described below.
|
|
418
|
+
*/
|
|
419
|
+
readonly readyState: number;
|
|
420
|
+
readonly CLOSED: number;
|
|
421
|
+
readonly CLOSING: number;
|
|
422
|
+
readonly CONNECTING: number;
|
|
423
|
+
readonly OPEN: number;
|
|
424
|
+
|
|
425
|
+
onclose: ((this: WebSocket, ev: CloseEvent) => any) | null;
|
|
426
|
+
onerror: ((this: WebSocket, ev: Event) => any) | null;
|
|
427
|
+
onmessage: ((this: WebSocket, ev: MsgEvent) => any) | null;
|
|
428
|
+
onopen: ((this: WebSocket, ev: Event) => any) | null;
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* Closes the WebSocket connection, optionally using code as the the WebSocket connection close code and reason as the the WebSocket connection close reason.
|
|
432
|
+
*/
|
|
433
|
+
close(code?: number, reason?: string): void;
|
|
434
|
+
/**
|
|
435
|
+
* Transmits data using the WebSocket connection. data can be a string, a Blob, an ArrayBuffer, or an ArrayBufferView.
|
|
436
|
+
*/
|
|
437
|
+
send(data: string | ArrayBufferLike | ArrayBufferView): void;
|
|
438
|
+
/**
|
|
439
|
+
* Receive network messages synchronously, for debugger use only.
|
|
440
|
+
*/
|
|
441
|
+
syncReceiveMsg(timeout?: number): string;
|
|
442
|
+
zip(data: any): void;
|
|
443
|
+
|
|
444
|
+
unzip(data: any): void;
|
|
445
|
+
|
|
446
|
+
addEventListener<K extends keyof WebSocketEventMap>(type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any): void;
|
|
447
|
+
|
|
448
|
+
removeEventListener<K extends keyof WebSocketEventMap>(type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any): void;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
declare let WebSocket: {
|
|
452
|
+
prototype: WebSocket;
|
|
453
|
+
new (url: string, protocols?: string | string[]): WebSocket;
|
|
454
|
+
readonly CLOSED: number;
|
|
455
|
+
readonly CLOSING: number;
|
|
456
|
+
readonly CONNECTING: number;
|
|
457
|
+
readonly OPEN: number;
|
|
458
|
+
};
|
|
459
|
+
|
|
460
|
+
///////////////////////////////////////////////////////////
|
|
461
|
+
|
|
462
|
+
interface XMLHttpRequestEventMap extends XMLHttpRequestEventTargetEventMap {
|
|
463
|
+
readystatechange: Event;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
type BufferSource = ArrayBufferView | ArrayBuffer;
|
|
467
|
+
type BodyInit = BufferSource | string;
|
|
468
|
+
type XMLHttpRequestResponseType = '' | 'arraybuffer' | 'blob' | 'document' | 'json' | 'text';
|
|
469
|
+
|
|
470
|
+
/*pix
|
|
471
|
+
gen: struct
|
|
472
|
+
convertor: toJS
|
|
473
|
+
*/
|
|
474
|
+
interface NetDebugMsg {
|
|
475
|
+
total_time?: number /* defaultValue:0.0 */;
|
|
476
|
+
namelookup_time?: number /* defaultValue:0.0 */;
|
|
477
|
+
connect_time?: number /* defaultValue:0.0 */;
|
|
478
|
+
appconnect_time?: number /* defaultValue:0.0 */;
|
|
479
|
+
pretransfer_time?: number /* defaultValue:0.0 */;
|
|
480
|
+
redirect_time?: number /* defaultValue:0.0 */;
|
|
481
|
+
start_transfer_time?: number /* defaultValue:0.0 */;
|
|
482
|
+
download_size?: number /* defaultValue:0.0 */;
|
|
483
|
+
upload_size?: number /* defaultValue:0.0 */;
|
|
484
|
+
req_size?: number /* defaultValue:0.0 */;
|
|
485
|
+
header_size?: number /* defaultValue:0.0 */;
|
|
486
|
+
speed_download?: number /* defaultValue:0.0 */;
|
|
487
|
+
speed_upload?: number /* defaultValue:0.0 */;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
/*pix
|
|
491
|
+
gen: binding
|
|
492
|
+
*/
|
|
493
|
+
/** Use XMLHttpRequest (XHR) objects to interact with servers. You can retrieve data from a URL without having to do a full page refresh. This enables a Web page to update just part of a page without disrupting what the user is doing. */
|
|
494
|
+
interface XMLHttpRequest extends EventTarget {
|
|
495
|
+
readonly DONE: number /* value:4 */;
|
|
496
|
+
readonly LOADING: number /* value:3 */;
|
|
497
|
+
readonly HEADERS_RECEIVED: number /* value:2 */;
|
|
498
|
+
readonly OPENED: number /* value:1 */;
|
|
499
|
+
readonly UNSENT: number /* value:0 */;
|
|
500
|
+
/**
|
|
501
|
+
* Returns the associated XMLHttpRequestUpload object. It can be used to gather transmission information when data is transferred to a server.
|
|
502
|
+
*/
|
|
503
|
+
readonly upload: XMLHttpRequestUpload;
|
|
504
|
+
|
|
505
|
+
readonly status: number;
|
|
506
|
+
/**
|
|
507
|
+
* Returns the response's body.
|
|
508
|
+
*/
|
|
509
|
+
readonly response: any;
|
|
510
|
+
|
|
511
|
+
readonly statusText: string;
|
|
512
|
+
/**
|
|
513
|
+
* Returns client's state.
|
|
514
|
+
*/
|
|
515
|
+
readonly readyState: number;
|
|
516
|
+
/**
|
|
517
|
+
* Returns the text response.
|
|
518
|
+
*
|
|
519
|
+
* Throws an "InvalidStateError" DOMException if responseType is not the empty string or "text".
|
|
520
|
+
*/
|
|
521
|
+
readonly responseText: string;
|
|
522
|
+
|
|
523
|
+
readonly responseURL: string;
|
|
524
|
+
/**
|
|
525
|
+
* Can be set to a time in milliseconds. When set to a non-zero value will cause fetching to terminate after the given time has passed. When the time has passed, the request has not yet completed, and the synchronous flag is unset, a timeout event will then be dispatched, or a "TimeoutError" DOMException will be thrown otherwise (for the send() method).
|
|
526
|
+
*
|
|
527
|
+
* When set: throws an "InvalidAccessError" DOMException if the synchronous flag is set and current global object is a Window object.
|
|
528
|
+
*/
|
|
529
|
+
timeout: number;
|
|
530
|
+
/**
|
|
531
|
+
* Returns the response type.
|
|
532
|
+
*
|
|
533
|
+
* Can be set to change the response type. Values are: the empty string (default), "arraybuffer", "blob", "document", "json", and "text".
|
|
534
|
+
*
|
|
535
|
+
* When set: setting to "document" is ignored if current global object is not a Window object.
|
|
536
|
+
*
|
|
537
|
+
* When set: throws an "InvalidStateError" DOMException if state is loading or done.
|
|
538
|
+
*
|
|
539
|
+
* When set: throws an "InvalidAccessError" DOMException if the synchronous flag is set and current global object is a Window object.
|
|
540
|
+
*/
|
|
541
|
+
responseType: XMLHttpRequestResponseType;
|
|
542
|
+
/**
|
|
543
|
+
* Get Set xhr incrementalDataSize.
|
|
544
|
+
* default is 0, means do not call onincrementaldata
|
|
545
|
+
* if set 1024, then call onincrementaldata when recv data size over 1024B,
|
|
546
|
+
*/
|
|
547
|
+
incrementalDataSize: number;
|
|
548
|
+
|
|
549
|
+
onabort: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
|
|
550
|
+
onerror: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
|
|
551
|
+
onload: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
|
|
552
|
+
onloadend: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
|
|
553
|
+
onloadstart: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
|
|
554
|
+
onprogress: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
|
|
555
|
+
ontimeout: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
|
|
556
|
+
onreadystatechange: ((this: XMLHttpRequest, ev: Event) => any) | null;
|
|
557
|
+
onincrementaldata: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
|
|
558
|
+
|
|
559
|
+
/**
|
|
560
|
+
* Cancels any network activity.
|
|
561
|
+
*/
|
|
562
|
+
abort(): void;
|
|
563
|
+
|
|
564
|
+
getResponseHeader(name: string): string | null;
|
|
565
|
+
|
|
566
|
+
getAllResponseHeaders(): string;
|
|
567
|
+
|
|
568
|
+
/**
|
|
569
|
+
* Sets the request method, request URL, and synchronous flag.
|
|
570
|
+
*
|
|
571
|
+
* Throws a "SyntaxError" DOMException if either method is not a valid HTTP method or url cannot be parsed.
|
|
572
|
+
*
|
|
573
|
+
* Throws a "SecurityError" DOMException if method is a case-insensitive match for `CONNECT`, `TRACE`, or `TRACK`.
|
|
574
|
+
*
|
|
575
|
+
* Throws an "InvalidAccessError" DOMException if async is false, current global object is a Window object, and the timeout attribute is not zero or the responseType attribute is not the empty string.
|
|
576
|
+
*/
|
|
577
|
+
open(method: string, url: string, async: boolean, username?: string | null, password?: string | null): void;
|
|
578
|
+
|
|
579
|
+
/**
|
|
580
|
+
* Initiates the request. The body argument provides the request body, if any, and is ignored if the request method is GET or HEAD.
|
|
581
|
+
*
|
|
582
|
+
* Throws an "InvalidStateError" DOMException if either state is not opened or the send() flag is set.
|
|
583
|
+
*/
|
|
584
|
+
send(body?: BodyInit | null): void;
|
|
585
|
+
|
|
586
|
+
/**
|
|
587
|
+
* Combines a header in author request headers.
|
|
588
|
+
*
|
|
589
|
+
* Throws an "InvalidStateError" DOMException if either state is not opened or the send() flag is set.
|
|
590
|
+
*
|
|
591
|
+
* Throws a "SyntaxError" DOMException if name is not a header name or if value is not a header value.
|
|
592
|
+
*/
|
|
593
|
+
setRequestHeader(name: string, value: string): void;
|
|
594
|
+
|
|
595
|
+
/**
|
|
596
|
+
* Set xhr request to net debug mode
|
|
597
|
+
* Net stat will be saved after req finished
|
|
598
|
+
*/
|
|
599
|
+
setDebugMode(isDebug: boolean): void;
|
|
600
|
+
|
|
601
|
+
/**
|
|
602
|
+
* Return net stat to js
|
|
603
|
+
*/
|
|
604
|
+
getDebugMsg(): NetDebugMsg;
|
|
605
|
+
|
|
606
|
+
setCurlEasyOpt(opt: number, val: number): void;
|
|
607
|
+
setCurlHostAddress(hostAddress: string): void;
|
|
608
|
+
|
|
609
|
+
addEventListener<K extends keyof XMLHttpRequestEventMap>(type: K, listener: (this: XMLHttpRequest, ev: XMLHttpRequestEventMap[K]) => any): void;
|
|
610
|
+
|
|
611
|
+
removeEventListener<K extends keyof XMLHttpRequestEventMap>(type: K, listener: (this: XMLHttpRequest, ev: XMLHttpRequestEventMap[K]) => any): void;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
declare let XMLHttpRequest: {
|
|
615
|
+
prototype: XMLHttpRequest;
|
|
616
|
+
new (): XMLHttpRequest;
|
|
617
|
+
readonly DONE: number;
|
|
618
|
+
readonly HEADERS_RECEIVED: number;
|
|
619
|
+
readonly LOADING: number;
|
|
620
|
+
readonly OPENED: number;
|
|
621
|
+
readonly UNSENT: number;
|
|
622
|
+
};
|
|
623
|
+
|
|
624
|
+
/*pix
|
|
625
|
+
gen: binding
|
|
626
|
+
cpp-class: XmlHttpRequestProgressEvent
|
|
627
|
+
*/
|
|
628
|
+
interface ProgressEvent<T extends EventTarget = EventTarget> extends Event {
|
|
629
|
+
readonly lengthComputable: boolean;
|
|
630
|
+
readonly loaded: number;
|
|
631
|
+
readonly total: number;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
interface PopStateEvent<T extends EventTarget = EventTarget> extends Event {
|
|
635
|
+
readonly target: T | null;
|
|
636
|
+
readonly state: any;
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
interface XMLHttpRequestEventTargetEventMap {
|
|
640
|
+
abort: ProgressEvent<XMLHttpRequestEventTarget>;
|
|
641
|
+
error: ProgressEvent<XMLHttpRequestEventTarget>;
|
|
642
|
+
load: ProgressEvent<XMLHttpRequestEventTarget>;
|
|
643
|
+
loadend: ProgressEvent<XMLHttpRequestEventTarget>;
|
|
644
|
+
loadstart: ProgressEvent<XMLHttpRequestEventTarget>;
|
|
645
|
+
progress: ProgressEvent<XMLHttpRequestEventTarget>;
|
|
646
|
+
timeout: ProgressEvent<XMLHttpRequestEventTarget>;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
interface XMLHttpRequestEventTarget extends EventTarget {
|
|
650
|
+
onabort: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
|
|
651
|
+
onerror: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
|
|
652
|
+
onload: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
|
|
653
|
+
onloadend: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
|
|
654
|
+
onloadstart: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
|
|
655
|
+
onprogress: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
|
|
656
|
+
ontimeout: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
|
|
657
|
+
|
|
658
|
+
addEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestEventTarget, ev: XMLHttpRequestEventTargetEventMap[K]) => any): void;
|
|
659
|
+
|
|
660
|
+
removeEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestEventTarget, ev: XMLHttpRequestEventTargetEventMap[K]) => any): void;
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
/*pix
|
|
664
|
+
gen: binding
|
|
665
|
+
*/
|
|
666
|
+
interface XMLHttpRequestUpload extends EventTarget {
|
|
667
|
+
onabort: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
|
|
668
|
+
onerror: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
|
|
669
|
+
onload: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
|
|
670
|
+
onloadend: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
|
|
671
|
+
onloadstart: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
|
|
672
|
+
onprogress: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
|
|
673
|
+
ontimeout: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
|
|
674
|
+
addEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestUpload, ev: XMLHttpRequestEventTargetEventMap[K]) => any): void;
|
|
675
|
+
|
|
676
|
+
removeEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestUpload, ev: XMLHttpRequestEventTargetEventMap[K]) => any): void;
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
/*pix
|
|
680
|
+
gen: binding
|
|
681
|
+
*/
|
|
682
|
+
interface XmlHttpRequestEvent {}
|
|
955
683
|
|
|
956
|
-
|
|
684
|
+
/*pix
|
|
685
|
+
gen: binding
|
|
686
|
+
*/
|
|
687
|
+
interface XmlHttpRequestErrorEvent {
|
|
688
|
+
message: string;
|
|
689
|
+
}
|
|
957
690
|
|
|
958
|
-
|
|
691
|
+
/*pix
|
|
692
|
+
gen: binding
|
|
693
|
+
cpp-class: DomRect
|
|
694
|
+
*/
|
|
695
|
+
interface DOMRect {
|
|
696
|
+
readonly height: number;
|
|
697
|
+
readonly width: number;
|
|
698
|
+
readonly x: number;
|
|
699
|
+
readonly y: number;
|
|
700
|
+
readonly left: number;
|
|
701
|
+
readonly top: number;
|
|
702
|
+
readonly right: number;
|
|
703
|
+
readonly bottom: number;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
declare let DOMRect: {
|
|
707
|
+
prototype: DOMRect;
|
|
708
|
+
new (element: HTMLElement): DOMRect;
|
|
709
|
+
};
|
|
710
|
+
|
|
711
|
+
interface EventHandlersEventMap {
|
|
712
|
+
click: MouseClickEvent;
|
|
713
|
+
load: Event;
|
|
714
|
+
mousedown: MouseDownEvent;
|
|
715
|
+
mousemove: MouseMoveEvent;
|
|
716
|
+
mouseout: MouseMoveEvent;
|
|
717
|
+
mouseover: MouseMoveEvent;
|
|
718
|
+
mouseup: MouseUpEvent;
|
|
719
|
+
mouseleave: Event;
|
|
720
|
+
mouseenter: Event;
|
|
721
|
+
wheel: WheelEvent;
|
|
722
|
+
animationstart: AnimationEvent;
|
|
723
|
+
animationend: AnimationEvent;
|
|
724
|
+
animationiteration: AnimationEvent;
|
|
725
|
+
transitionstart: TransitionEvent;
|
|
726
|
+
transitionend: TransitionEvent;
|
|
727
|
+
drag: MouseDragEvent;
|
|
728
|
+
dragstart: MouseDragEvent;
|
|
729
|
+
dragend: MouseDragEvent;
|
|
730
|
+
dragenter: MouseDragEvent;
|
|
731
|
+
dragleave: MouseDragEvent;
|
|
732
|
+
dragover: MouseDragEvent;
|
|
733
|
+
drop: MouseDragEvent;
|
|
734
|
+
scroll: Event;
|
|
735
|
+
touchcancel: TouchEvent;
|
|
736
|
+
touchend: TouchEvent;
|
|
737
|
+
touchmove: TouchEvent;
|
|
738
|
+
touchstart: TouchEvent;
|
|
739
|
+
// 'change': Event;
|
|
740
|
+
// 'input': Event;
|
|
741
|
+
keydown: KeyboardEvent;
|
|
742
|
+
keypress: KeyboardEvent;
|
|
743
|
+
keyup: KeyboardEvent;
|
|
744
|
+
|
|
745
|
+
resize: Event;
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
interface EventHandlers {
|
|
749
|
+
onclick: ((this: EventHandlers, ev: MouseClickEvent) => any) | null;
|
|
750
|
+
onload: ((this: EventHandlers, ev: Event) => any) | null;
|
|
751
|
+
onerror: ((this: EventHandlers, ev: ErrorEvent) => any) | null;
|
|
752
|
+
onmousedown: ((this: EventHandlers, ev: MouseDownEvent) => any) | null;
|
|
753
|
+
onmousemove: ((this: EventHandlers, ev: MouseMoveEvent) => any) | null;
|
|
754
|
+
onmouseout: ((this: EventHandlers, ev: MouseMoveEvent) => any) | null;
|
|
755
|
+
onmouseover: ((this: EventHandlers, ev: MouseMoveEvent) => any) | null;
|
|
756
|
+
onmouseup: ((this: EventHandlers, ev: MouseUpEvent) => any) | null;
|
|
757
|
+
onmouseleave: ((this: EventHandlers, ev: Event) => any) | null;
|
|
758
|
+
onmouseenter: ((this: EventHandlers, ev: Event) => any) | null;
|
|
759
|
+
onwheel: ((this: EventHandlers, ev: WheelEvent) => any) | null;
|
|
760
|
+
|
|
761
|
+
onanimationstart: ((this: EventHandlers, ev: AnimationEvent) => any) | null;
|
|
762
|
+
onanimationend: ((this: EventHandlers, ev: AnimationEvent) => any) | null;
|
|
763
|
+
onanimationiteration: ((this: EventHandlers, ev: AnimationEvent) => any) | null;
|
|
764
|
+
ontransitionstart: ((this: EventHandlers, ev: TransitionEvent) => any) | null;
|
|
765
|
+
ontransitionend: ((this: EventHandlers, ev: TransitionEvent) => any) | null;
|
|
766
|
+
|
|
767
|
+
ondrag: ((this: EventHandlers, ev: MouseDragEvent) => any) | null;
|
|
768
|
+
ondragstart: ((this: EventHandlers, ev: MouseDragEvent) => any) | null;
|
|
769
|
+
ondragend: ((this: EventHandlers, ev: MouseDragEvent) => any) | null;
|
|
770
|
+
ondragenter: ((this: EventHandlers, ev: MouseDragEvent) => any) | null;
|
|
771
|
+
ondragleave: ((this: EventHandlers, ev: MouseDragEvent) => any) | null;
|
|
772
|
+
ondragover: ((this: EventHandlers, ev: MouseDragEvent) => any) | null;
|
|
773
|
+
ondrop: ((this: EventHandlers, ev: MouseDragEvent) => any) | null;
|
|
774
|
+
|
|
775
|
+
onscroll: ((this: EventHandlers, ev: Event) => any) | null;
|
|
776
|
+
|
|
777
|
+
ontouchcancel?: ((this: EventHandlers, ev: TouchEvent) => any) | null;
|
|
778
|
+
ontouchend?: ((this: EventHandlers, ev: TouchEvent) => any) | null;
|
|
779
|
+
ontouchmove?: ((this: EventHandlers, ev: TouchEvent) => any) | null;
|
|
780
|
+
ontouchstart?: ((this: EventHandlers, ev: TouchEvent) => any) | null;
|
|
781
|
+
|
|
782
|
+
// onchange: ((this: EventHandlers, ev: Event) => any) | null;
|
|
783
|
+
// oninput: ((this: EventHandlers, ev: Event) => any) | null;
|
|
784
|
+
onkeydown: ((this: EventHandlers, ev: KeyboardEvent) => any) | null;
|
|
785
|
+
onkeypress: ((this: EventHandlers, ev: KeyboardEvent) => any) | null;
|
|
786
|
+
onkeyup: ((this: EventHandlers, ev: KeyboardEvent) => any) | null;
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
/*pix
|
|
790
|
+
gen: struct
|
|
791
|
+
convertor: toJS
|
|
792
|
+
*/
|
|
793
|
+
interface Attr {
|
|
794
|
+
name: string;
|
|
795
|
+
value: string;
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
/*pix
|
|
799
|
+
gen: binding
|
|
800
|
+
cpp-class: H5Element
|
|
801
|
+
*/
|
|
802
|
+
interface Node extends EventTarget {
|
|
803
|
+
id: string;
|
|
804
|
+
readonly localName: string;
|
|
805
|
+
readonly tagName: string;
|
|
806
|
+
readonly nodeType: number;
|
|
807
|
+
readonly nodeName: string;
|
|
808
|
+
readonly ownerDocument: Document;
|
|
809
|
+
readonly parentNode?: HTMLElement;
|
|
810
|
+
readonly nextSibling?: NodeOrHTMLElement;
|
|
811
|
+
/**
|
|
812
|
+
* Returns element's first attribute whose qualified name is qualifiedName, and null if there is no such attribute otherwise.
|
|
813
|
+
*/
|
|
814
|
+
getAttribute(qualifiedName: string): string | null;
|
|
815
|
+
|
|
816
|
+
/**
|
|
817
|
+
* Returns true if element has an attribute whose qualified name is qualifiedName, and false otherwise.
|
|
818
|
+
*/
|
|
819
|
+
hasAttribute(qualifiedName: string): boolean;
|
|
820
|
+
|
|
821
|
+
/**
|
|
822
|
+
* Removes element's first attribute whose qualified name is qualifiedName.
|
|
823
|
+
*/
|
|
824
|
+
removeAttribute(qualifiedName: string): void;
|
|
825
|
+
|
|
826
|
+
/**
|
|
827
|
+
* Sets the value of element's first attribute whose qualified name is qualifiedName to value.
|
|
828
|
+
*/
|
|
829
|
+
setAttribute(qualifiedName: string, value: string): void;
|
|
830
|
+
|
|
831
|
+
className: string;
|
|
832
|
+
readonly attributes: Attr[];
|
|
833
|
+
textContent: string | null;
|
|
834
|
+
focus(): void;
|
|
835
|
+
blur(): void;
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
/*pix
|
|
839
|
+
gen: binding
|
|
840
|
+
cpp-class: H5ElementText
|
|
841
|
+
*/
|
|
842
|
+
/** The textual content of Element or Attr. If an element has no markup within its content, it has a single child implementing Text that contains the element's text. However, if the element contains markup, it is parsed into information items and Text nodes that form its children. */
|
|
843
|
+
interface Text extends Node {
|
|
844
|
+
data: string;
|
|
845
|
+
nodeValue: string;
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
/*pix
|
|
849
|
+
gen: binding
|
|
850
|
+
cpp-class: MediaError
|
|
851
|
+
*/
|
|
852
|
+
interface MediaError {
|
|
853
|
+
readonly message: string;
|
|
854
|
+
readonly code: number;
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
/*pix
|
|
858
|
+
gen: binding
|
|
859
|
+
cpp-class: H5ElementAudio
|
|
860
|
+
with-handlers: AudioEventHandlers
|
|
861
|
+
*/
|
|
862
|
+
interface HTMLAudioElement extends HTMLElement {
|
|
863
|
+
src: string;
|
|
864
|
+
loop: boolean;
|
|
865
|
+
currentTime: number;
|
|
866
|
+
muted: boolean;
|
|
867
|
+
readonly duration: number;
|
|
868
|
+
playbackRate: number;
|
|
869
|
+
autoPlay: boolean;
|
|
870
|
+
volume: number;
|
|
871
|
+
autoPauseOnBacked: boolean;
|
|
872
|
+
readonly error: MediaError;
|
|
873
|
+
preload: boolean;
|
|
959
874
|
|
|
960
|
-
|
|
875
|
+
play(): void;
|
|
961
876
|
|
|
962
|
-
|
|
877
|
+
pause(): void;
|
|
963
878
|
|
|
964
|
-
|
|
879
|
+
resume(): void;
|
|
965
880
|
|
|
966
|
-
|
|
881
|
+
seek(second: number): void;
|
|
967
882
|
|
|
968
|
-
|
|
883
|
+
stop(): void;
|
|
969
884
|
|
|
970
|
-
|
|
885
|
+
load(): void;
|
|
971
886
|
|
|
972
|
-
|
|
973
|
-
}
|
|
887
|
+
canPlayType(format: string): string;
|
|
974
888
|
|
|
975
|
-
|
|
976
|
-
gen: binding
|
|
977
|
-
cpp-class: TexMetr
|
|
978
|
-
*/
|
|
979
|
-
interface TexMetrics extends EventTarget {
|
|
980
|
-
readonly width: number;
|
|
981
|
-
}
|
|
889
|
+
addEventListener<K extends keyof AudioEventHandlersEventMap>(type: K, listener: (this: HTMLAudioElement, ev: AudioEventHandlersEventMap[K]) => any): void;
|
|
982
890
|
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
cpp-class: H5ElementSpine
|
|
986
|
-
cpp-precompile: BUILD_WITH_SPINE
|
|
987
|
-
*/
|
|
988
|
-
interface HTMLSpineElement extends HTMLElement {
|
|
989
|
-
scaleX: number;
|
|
990
|
-
scaleY: number;
|
|
991
|
-
timeScale: number;
|
|
992
|
-
animations: string[];
|
|
993
|
-
setAtlas(path: string): void;
|
|
994
|
-
setSkel(path: string): void;
|
|
995
|
-
setAnimation(name: string, loop: boolean);
|
|
996
|
-
}
|
|
891
|
+
removeEventListener<K extends keyof AudioEventHandlersEventMap>(type: K, listener: (this: HTMLAudioElement, ev: AudioEventHandlersEventMap[K]) => any): void;
|
|
892
|
+
}
|
|
997
893
|
|
|
998
|
-
/*pix
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
894
|
+
/*pix
|
|
895
|
+
gen: binding
|
|
896
|
+
cpp-class: H5ElementVideo
|
|
897
|
+
with-handlers: VideoEventHandlers
|
|
898
|
+
*/
|
|
899
|
+
interface HTMLVideoElement extends HTMLAudioElement {
|
|
900
|
+
poster: string;
|
|
1005
901
|
|
|
1006
|
-
|
|
902
|
+
addEventListener<K extends keyof VideoEventHandlersEventMap>(type: K, listener: (this: HTMLVideoElement, ev: VideoEventHandlersEventMap[K]) => any): void;
|
|
1007
903
|
|
|
1008
|
-
|
|
1009
|
-
}
|
|
904
|
+
removeEventListener<K extends keyof VideoEventHandlersEventMap>(type: K, listener: (this: HTMLVideoElement, ev: VideoEventHandlersEventMap[K]) => any): void;
|
|
905
|
+
}
|
|
1010
906
|
|
|
1011
|
-
|
|
907
|
+
/*pix
|
|
908
|
+
gen: binding
|
|
909
|
+
cpp-class: PxLibCustomValue
|
|
910
|
+
*/
|
|
911
|
+
interface PxLibCustomValue extends EventTarget {
|
|
912
|
+
isNull(): boolean;
|
|
1012
913
|
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
cpp-class: H5ElementTag
|
|
1016
|
-
with-handlers: EventHandlers
|
|
1017
|
-
*/
|
|
1018
|
-
/** HTMLElement is the most general base class from which all objects in a Document inherit. It only has methods and properties common to all kinds of elements. More specific classes inherit from HTMLElement. */
|
|
1019
|
-
interface HTMLElement extends Node, EventHandlers {
|
|
1020
|
-
click(): void;
|
|
914
|
+
libName(): string;
|
|
915
|
+
}
|
|
1021
916
|
|
|
1022
|
-
|
|
917
|
+
/*pix
|
|
918
|
+
gen: binding
|
|
919
|
+
cpp-class: RenderingContext
|
|
920
|
+
*/
|
|
921
|
+
interface CanvasRenderingContext2D extends HTMLElement {
|
|
922
|
+
lineWidth: number;
|
|
923
|
+
fillStyle: string;
|
|
924
|
+
strokeStyle: string;
|
|
925
|
+
font: string;
|
|
926
|
+
lineCap: string;
|
|
927
|
+
lineJoin: string;
|
|
928
|
+
textAlign: string;
|
|
929
|
+
textBaseline: string;
|
|
930
|
+
canvas: HTMLCanvasElement;
|
|
1023
931
|
|
|
1024
|
-
|
|
932
|
+
beginPath(): void;
|
|
1025
933
|
|
|
1026
|
-
|
|
934
|
+
closePath(): void;
|
|
1027
935
|
|
|
1028
|
-
|
|
936
|
+
moveTo(x: number, y: number): void;
|
|
1029
937
|
|
|
1030
|
-
|
|
938
|
+
lineTo(x: number, y: number): void;
|
|
1031
939
|
|
|
1032
|
-
|
|
940
|
+
stroke(): void;
|
|
1033
941
|
|
|
1034
|
-
|
|
942
|
+
fill(): void;
|
|
1035
943
|
|
|
1036
|
-
|
|
1037
|
-
* Returns a HTMLCollection of the elements in the object on which the method was invoked (a document or an element) that have all the classes given by classNames. The classNames argument is interpreted as a space-separated list of classes.
|
|
1038
|
-
*/
|
|
1039
|
-
getElementsByClassName(classNames: string): HTMLElement[];
|
|
944
|
+
arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise: number): void;
|
|
1040
945
|
|
|
1041
|
-
|
|
1042
|
-
* Retrieves a collection of objects based on the specified element name.
|
|
1043
|
-
* @param name Specifies the name of an element.
|
|
1044
|
-
*/
|
|
1045
|
-
getElementsByTagName(qualifiedName: string): HTMLElement[];
|
|
946
|
+
arcTo(fromX: number, fromY: number, toX: number, toY: number, radius: number): void;
|
|
1046
947
|
|
|
1047
|
-
|
|
948
|
+
strokeRect(x: number, y: number, w: number, h: number): void;
|
|
1048
949
|
|
|
1049
|
-
|
|
950
|
+
fillRect(x: number, y: number, w: number, h: number): void;
|
|
1050
951
|
|
|
1051
|
-
|
|
952
|
+
clearRect(x: number, y: number, w: number, h: number): void;
|
|
1052
953
|
|
|
1053
|
-
|
|
954
|
+
drawImage(ele: HTMLElement, a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number): void;
|
|
1054
955
|
|
|
1055
|
-
|
|
1056
|
-
readonly children: HTMLElement[];
|
|
1057
|
-
id: string;
|
|
1058
|
-
draggable: boolean;
|
|
1059
|
-
style: CSSStyleDeclaration;
|
|
1060
|
-
classList: DOMTokenList;
|
|
1061
|
-
innerText: string;
|
|
1062
|
-
innerHTML: string;
|
|
1063
|
-
outerHTML: string;
|
|
1064
|
-
scrollLeft: number;
|
|
1065
|
-
scrollTop: number;
|
|
1066
|
-
firstChild: NodeOrHTMLElement;
|
|
1067
|
-
firstElementChild: NodeOrHTMLElement;
|
|
1068
|
-
lastChild: NodeOrHTMLElement;
|
|
1069
|
-
nextElementSibling: HTMLElement;
|
|
1070
|
-
readonly clientHeight: number;
|
|
1071
|
-
readonly clientWidth: number;
|
|
1072
|
-
readonly scrollHeight: number;
|
|
1073
|
-
readonly scrollWidth: number;
|
|
1074
|
-
}
|
|
956
|
+
fillText(text: string, x: number, y: number): void;
|
|
1075
957
|
|
|
1076
|
-
|
|
1077
|
-
gen: binding
|
|
1078
|
-
cpp-class: H5ElementDiv
|
|
1079
|
-
*/
|
|
1080
|
-
interface HTMLDivElement extends HTMLElement {}
|
|
1081
|
-
|
|
1082
|
-
/*pix
|
|
1083
|
-
gen: binding
|
|
1084
|
-
cpp-class: H5ElementScript
|
|
1085
|
-
*/
|
|
1086
|
-
interface HTMLScriptElement extends HTMLElement {
|
|
1087
|
-
async: boolean;
|
|
1088
|
-
/**
|
|
1089
|
-
* Retrieves the URL to an external file that contains the source code or data.
|
|
1090
|
-
*/
|
|
1091
|
-
src: string;
|
|
1092
|
-
/**
|
|
1093
|
-
* Retrieves or sets the text of the object as a string.
|
|
1094
|
-
*/
|
|
1095
|
-
text: string;
|
|
1096
|
-
content: string;
|
|
1097
|
-
}
|
|
958
|
+
save(): void;
|
|
1098
959
|
|
|
1099
|
-
|
|
1100
|
-
gen: binding
|
|
1101
|
-
cpp-class: H5ElementComment
|
|
1102
|
-
*/
|
|
1103
|
-
/** Textual notations within markup; although it is generally not visually shown, such comments are available to be read in the source view. */
|
|
1104
|
-
interface Comment extends Node {}
|
|
1105
|
-
|
|
1106
|
-
/*pix
|
|
1107
|
-
gen: binding
|
|
1108
|
-
cpp-class: H5ElementImage
|
|
1109
|
-
*/
|
|
1110
|
-
/** Provides special properties and methods for manipulating <img> elements. */
|
|
1111
|
-
interface HTMLImageElement extends HTMLElement {
|
|
1112
|
-
src: string;
|
|
1113
|
-
height: number;
|
|
1114
|
-
width: number;
|
|
1115
|
-
}
|
|
960
|
+
restore(): void;
|
|
1116
961
|
|
|
1117
|
-
|
|
1118
|
-
gen: binding
|
|
1119
|
-
cpp-class: H5ElementLottie
|
|
1120
|
-
with-handlers: LottieEventHandlers
|
|
1121
|
-
cpp-precompile: BUILD_WITH_RLOTTIE
|
|
1122
|
-
*/
|
|
1123
|
-
interface HTMLLottieElement extends HTMLImageElement, LottieEventHandlers {
|
|
1124
|
-
play(): void;
|
|
962
|
+
rect(x: number, y: number, w: number, h: number): void;
|
|
1125
963
|
|
|
1126
|
-
|
|
964
|
+
bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void;
|
|
1127
965
|
|
|
1128
|
-
|
|
966
|
+
quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;
|
|
1129
967
|
|
|
1130
|
-
|
|
1131
|
-
loop: boolean;
|
|
968
|
+
scale(x: number, y: number): void;
|
|
1132
969
|
|
|
1133
|
-
|
|
970
|
+
translate(x: number, y: number): void;
|
|
1134
971
|
|
|
1135
|
-
|
|
972
|
+
rotate(angle: number): void;
|
|
1136
973
|
|
|
1137
|
-
|
|
974
|
+
measureText(text: string): TexMetrics;
|
|
1138
975
|
|
|
1139
|
-
|
|
976
|
+
setTransform(a: number, b: number, c: number, d: number, e: number, f: number): void;
|
|
977
|
+
}
|
|
1140
978
|
|
|
1141
|
-
|
|
979
|
+
/*pix
|
|
980
|
+
gen: binding
|
|
981
|
+
cpp-class: TexMetr
|
|
982
|
+
*/
|
|
983
|
+
interface TexMetrics extends EventTarget {
|
|
984
|
+
readonly width: number;
|
|
985
|
+
}
|
|
1142
986
|
|
|
1143
|
-
|
|
987
|
+
/*pix
|
|
988
|
+
gen: binding
|
|
989
|
+
cpp-class: H5ElementSpine
|
|
990
|
+
cpp-precompile: BUILD_WITH_SPINE
|
|
991
|
+
*/
|
|
992
|
+
interface HTMLSpineElement extends HTMLElement {
|
|
993
|
+
scaleX: number;
|
|
994
|
+
scaleY: number;
|
|
995
|
+
timeScale: number;
|
|
996
|
+
animations: string[];
|
|
997
|
+
setAtlas(path: string): void;
|
|
998
|
+
setSkel(path: string): void;
|
|
999
|
+
setAnimation(name: string, loop: boolean);
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
/*pix
|
|
1003
|
+
gen: binding
|
|
1004
|
+
cpp-class: H5ElementCanvas
|
|
1005
|
+
*/
|
|
1006
|
+
interface HTMLCanvasElement extends HTMLElement {
|
|
1007
|
+
width: number;
|
|
1008
|
+
height: number;
|
|
1144
1009
|
|
|
1145
|
-
|
|
1010
|
+
getContext(type: string): CanvasRenderingContext2D;
|
|
1146
1011
|
|
|
1147
|
-
|
|
1012
|
+
toDataURL(type: string): string;
|
|
1013
|
+
}
|
|
1148
1014
|
|
|
1149
|
-
|
|
1150
|
-
}
|
|
1015
|
+
type NodeOrHTMLElement = Node | HTMLElement;
|
|
1151
1016
|
|
|
1152
|
-
/*pix
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
*/
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
accept: string;
|
|
1161
|
-
multiple: boolean;
|
|
1162
|
-
readonly files: File[];
|
|
1163
|
-
|
|
1164
|
-
updateCursorPosition(v: number): void;
|
|
1165
|
-
updateSelectionHead(v: number): void;
|
|
1166
|
-
updateSelectionTail(v: number): void;
|
|
1167
|
-
|
|
1168
|
-
copy(): void;
|
|
1169
|
-
paste(): void;
|
|
1170
|
-
cut(): void;
|
|
1171
|
-
|
|
1172
|
-
addEventListener<K extends keyof InputEventHandlersEventMap>(type: K, listener: (this: HTMLInputElement, ev: InputEventHandlersEventMap[K]) => any): void;
|
|
1173
|
-
|
|
1174
|
-
removeEventListener<K extends keyof InputEventHandlersEventMap>(type: K, listener: (this: HTMLInputElement, ev: InputEventHandlersEventMap[K]) => any): void;
|
|
1175
|
-
}
|
|
1017
|
+
/*pix
|
|
1018
|
+
gen: binding
|
|
1019
|
+
cpp-class: H5ElementTag
|
|
1020
|
+
with-handlers: EventHandlers
|
|
1021
|
+
*/
|
|
1022
|
+
/** HTMLElement is the most general base class from which all objects in a Document inherit. It only has methods and properties common to all kinds of elements. More specific classes inherit from HTMLElement. */
|
|
1023
|
+
interface HTMLElement extends Node, EventHandlers {
|
|
1024
|
+
click(): void;
|
|
1176
1025
|
|
|
1177
|
-
|
|
1178
|
-
gen: binding
|
|
1179
|
-
cpp-class: H5ElementTextArea
|
|
1180
|
-
with-handlers: InputEventHandlers
|
|
1181
|
-
*/
|
|
1182
|
-
interface HTMLTextAreaElement extends HTMLElement, InputEventHandlers {
|
|
1183
|
-
placeholder: string;
|
|
1184
|
-
value: string;
|
|
1026
|
+
appendChild(newChild: NodeOrHTMLElement): NodeOrHTMLElement;
|
|
1185
1027
|
|
|
1186
|
-
|
|
1187
|
-
updateSelectionHead(x: number, y: number): void;
|
|
1188
|
-
updateSelectionTail(x: number, y: number): void;
|
|
1028
|
+
insertBefore(newChild: NodeOrHTMLElement, refChild?: NodeOrHTMLElement): NodeOrHTMLElement;
|
|
1189
1029
|
|
|
1190
|
-
|
|
1030
|
+
removeChild(oldChild: NodeOrHTMLElement): NodeOrHTMLElement;
|
|
1191
1031
|
|
|
1192
|
-
|
|
1032
|
+
cloneNode(deep: boolean): NodeOrHTMLElement;
|
|
1193
1033
|
|
|
1194
|
-
|
|
1034
|
+
clearRecurise(): void;
|
|
1195
1035
|
|
|
1196
|
-
|
|
1036
|
+
dispatchEvent(event: Event): void;
|
|
1197
1037
|
|
|
1198
|
-
|
|
1199
|
-
}
|
|
1038
|
+
getBoundingClientRect(): DOMRect;
|
|
1200
1039
|
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
interface HTMLElementFragment extends HTMLElement {}
|
|
1206
|
-
|
|
1207
|
-
/*pix
|
|
1208
|
-
gen: binding
|
|
1209
|
-
cpp-class: H5ElementLink
|
|
1210
|
-
*/
|
|
1211
|
-
interface HTMLLinkElement extends HTMLElement {}
|
|
1212
|
-
|
|
1213
|
-
/*pix
|
|
1214
|
-
gen: binding
|
|
1215
|
-
cpp-class: H5ElementSlot
|
|
1216
|
-
*/
|
|
1217
|
-
interface HTMLSlotElement extends HTMLElement {
|
|
1218
|
-
src: string;
|
|
1219
|
-
attachment: number;
|
|
1220
|
-
}
|
|
1040
|
+
/**
|
|
1041
|
+
* Returns a HTMLCollection of the elements in the object on which the method was invoked (a document or an element) that have all the classes given by classNames. The classNames argument is interpreted as a space-separated list of classes.
|
|
1042
|
+
*/
|
|
1043
|
+
getElementsByClassName(classNames: string): HTMLElement[];
|
|
1221
1044
|
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
*/
|
|
1228
|
-
interface HTMLCefElement extends HTMLElement {
|
|
1229
|
-
src: string;
|
|
1230
|
-
executeJS(jsCode: string): number;
|
|
1231
|
-
addEventListener<K extends keyof CefEventHandlersEventMap>(type: K, listener: (this: HTMLCefElement, ev: CefEventHandlersEventMap[K]) => any): void;
|
|
1232
|
-
removeEventListener<K extends keyof CefEventHandlersEventMap>(type: K, listener: (this: HTMLCefElement, ev: CefEventHandlersEventMap[K]) => any): void;
|
|
1233
|
-
}
|
|
1045
|
+
/**
|
|
1046
|
+
* Retrieves a collection of objects based on the specified element name.
|
|
1047
|
+
* @param name Specifies the name of an element.
|
|
1048
|
+
*/
|
|
1049
|
+
getElementsByTagName(qualifiedName: string): HTMLElement[];
|
|
1234
1050
|
|
|
1235
|
-
|
|
1236
|
-
gen: binding
|
|
1237
|
-
cpp-class: H5ElementTextField
|
|
1238
|
-
*/
|
|
1239
|
-
interface HTMLTextFieldElement extends HTMLDivElement {
|
|
1240
|
-
calcHeight: number;
|
|
1241
|
-
}
|
|
1051
|
+
querySelectorAll(selectors: string): HTMLElement[];
|
|
1242
1052
|
|
|
1243
|
-
|
|
1244
|
-
gen: binding
|
|
1245
|
-
cpp-class: H5Document
|
|
1246
|
-
*/
|
|
1247
|
-
interface Document extends Node {
|
|
1248
|
-
readonly nodeType: number /* value:9 */;
|
|
1249
|
-
body: HTMLElement;
|
|
1250
|
-
head: HTMLElement;
|
|
1251
|
-
title: string;
|
|
1252
|
-
readonly defaultView: Window;
|
|
1253
|
-
readonly documentElement: HTMLElement;
|
|
1254
|
-
readonly activeElement: HTMLElement;
|
|
1255
|
-
hidden: boolean;
|
|
1256
|
-
visibilityState: string;
|
|
1257
|
-
styleSheets: CSSStyleSheet[];
|
|
1258
|
-
|
|
1259
|
-
createEvent(type: string): Event;
|
|
1260
|
-
|
|
1261
|
-
createElement(tagName: string): HTMLElement;
|
|
1262
|
-
|
|
1263
|
-
createComment(text: string): HTMLElement;
|
|
1264
|
-
|
|
1265
|
-
createElementNS(namespace: string, tagName: string): HTMLElement;
|
|
1266
|
-
|
|
1267
|
-
createDocumentFragment(): HTMLElementFragment;
|
|
1268
|
-
|
|
1269
|
-
/**
|
|
1270
|
-
* Creates a text string from the specified value.
|
|
1271
|
-
* @param data String that specifies the nodeValue property of the text node.
|
|
1272
|
-
*/
|
|
1273
|
-
createTextNode(data: string): Text;
|
|
1274
|
-
|
|
1275
|
-
/**
|
|
1276
|
-
* Returns a reference to the first object with the specified value of the ID attribute.
|
|
1277
|
-
* @param elementId String that specifies the ID value.
|
|
1278
|
-
*/
|
|
1279
|
-
getElementById(elementId: string): HTMLElement | null;
|
|
1280
|
-
|
|
1281
|
-
/**
|
|
1282
|
-
* Returns a HTMLCollection of the elements in the object on which the method was invoked (a document or an element) that have all the classes given by classNames. The classNames argument is interpreted as a space-separated list of classes.
|
|
1283
|
-
*/
|
|
1284
|
-
getElementsByClassName(classNames: string): HTMLElement[];
|
|
1285
|
-
|
|
1286
|
-
/**
|
|
1287
|
-
* Retrieves a collection of objects based on the specified element name.
|
|
1288
|
-
* @param name Specifies the name of an element.
|
|
1289
|
-
*/
|
|
1290
|
-
getElementsByTagName(qualifiedName: string): HTMLElement[];
|
|
1291
|
-
|
|
1292
|
-
/**
|
|
1293
|
-
* Returns the first element that is a descendant of node that matches selectors.
|
|
1294
|
-
*/
|
|
1295
|
-
querySelector<E extends HTMLElement = HTMLElement>(selectors: string): E | null;
|
|
1296
|
-
|
|
1297
|
-
/**
|
|
1298
|
-
* Returns all element descendants of node that match selectors.
|
|
1299
|
-
*/
|
|
1300
|
-
querySelectorAll<E extends HTMLElement = HTMLElement>(selectors: string): Array<E>;
|
|
1301
|
-
}
|
|
1053
|
+
querySelector(selectors: string): HTMLElement;
|
|
1302
1054
|
|
|
1303
|
-
|
|
1304
|
-
gen: binding
|
|
1305
|
-
cpp-class: H5TokenList
|
|
1306
|
-
*/
|
|
1307
|
-
interface DOMTokenList {
|
|
1308
|
-
readonly length: number;
|
|
1309
|
-
value: string;
|
|
1055
|
+
addEventListener<K extends keyof EventHandlersEventMap>(type: K, listener: (this: EventHandlers, ev: EventHandlersEventMap[K]) => any): void;
|
|
1310
1056
|
|
|
1311
|
-
|
|
1057
|
+
removeEventListener<K extends keyof EventHandlersEventMap>(type: K, listener: (this: EventHandlers, ev: EventHandlersEventMap[K]) => any): void;
|
|
1312
1058
|
|
|
1313
|
-
|
|
1059
|
+
readonly childNodes: NodeOrHTMLElement[];
|
|
1060
|
+
readonly children: HTMLElement[];
|
|
1061
|
+
id: string;
|
|
1062
|
+
draggable: boolean;
|
|
1063
|
+
style: CSSStyleDeclaration;
|
|
1064
|
+
classList: DOMTokenList;
|
|
1065
|
+
innerText: string;
|
|
1066
|
+
innerHTML: string;
|
|
1067
|
+
outerHTML: string;
|
|
1068
|
+
scrollLeft: number;
|
|
1069
|
+
scrollTop: number;
|
|
1070
|
+
firstChild: NodeOrHTMLElement;
|
|
1071
|
+
firstElementChild: NodeOrHTMLElement;
|
|
1072
|
+
lastChild: NodeOrHTMLElement;
|
|
1073
|
+
nextElementSibling: HTMLElement;
|
|
1074
|
+
readonly clientHeight: number;
|
|
1075
|
+
readonly clientWidth: number;
|
|
1076
|
+
readonly scrollHeight: number;
|
|
1077
|
+
readonly scrollWidth: number;
|
|
1078
|
+
}
|
|
1314
1079
|
|
|
1315
|
-
|
|
1080
|
+
/*pix
|
|
1081
|
+
gen: binding
|
|
1082
|
+
cpp-class: H5ElementDiv
|
|
1083
|
+
*/
|
|
1084
|
+
interface HTMLDivElement extends HTMLElement {}
|
|
1316
1085
|
|
|
1317
|
-
|
|
1086
|
+
/*pix
|
|
1087
|
+
gen: binding
|
|
1088
|
+
cpp-class: H5ElementScript
|
|
1089
|
+
*/
|
|
1090
|
+
interface HTMLScriptElement extends HTMLElement {
|
|
1091
|
+
async: boolean;
|
|
1092
|
+
/**
|
|
1093
|
+
* Retrieves the URL to an external file that contains the source code or data.
|
|
1094
|
+
*/
|
|
1095
|
+
src: string;
|
|
1096
|
+
/**
|
|
1097
|
+
* Retrieves or sets the text of the object as a string.
|
|
1098
|
+
*/
|
|
1099
|
+
text: string;
|
|
1100
|
+
content: string;
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
|
+
/*pix
|
|
1104
|
+
gen: binding
|
|
1105
|
+
cpp-class: H5ElementComment
|
|
1106
|
+
*/
|
|
1107
|
+
/** Textual notations within markup; although it is generally not visually shown, such comments are available to be read in the source view. */
|
|
1108
|
+
interface Comment extends Node {}
|
|
1318
1109
|
|
|
1319
|
-
|
|
1110
|
+
/*pix
|
|
1111
|
+
gen: binding
|
|
1112
|
+
cpp-class: H5ElementImage
|
|
1113
|
+
*/
|
|
1114
|
+
/** Provides special properties and methods for manipulating <img> elements. */
|
|
1115
|
+
interface HTMLImageElement extends HTMLElement {
|
|
1116
|
+
src: string;
|
|
1117
|
+
height: number;
|
|
1118
|
+
width: number;
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
/*pix
|
|
1122
|
+
gen: binding
|
|
1123
|
+
cpp-class: H5ElementLottie
|
|
1124
|
+
with-handlers: LottieEventHandlers
|
|
1125
|
+
cpp-precompile: BUILD_WITH_RLOTTIE
|
|
1126
|
+
*/
|
|
1127
|
+
interface HTMLLottieElement extends HTMLImageElement, LottieEventHandlers {
|
|
1128
|
+
play(): void;
|
|
1320
1129
|
|
|
1321
|
-
|
|
1130
|
+
stop(): void;
|
|
1322
1131
|
|
|
1323
|
-
|
|
1132
|
+
pause(): void;
|
|
1324
1133
|
|
|
1325
|
-
|
|
1134
|
+
autoPlay: boolean;
|
|
1135
|
+
loop: boolean;
|
|
1326
1136
|
|
|
1327
|
-
|
|
1328
|
-
}
|
|
1137
|
+
setDirection(dr: number): void;
|
|
1329
1138
|
|
|
1330
|
-
|
|
1331
|
-
gen: binding
|
|
1332
|
-
*/
|
|
1333
|
-
/** An object that is a CSS declaration block, and exposes style information and various style-related methods and properties. */
|
|
1334
|
-
interface CSSStyleDeclaration extends EventTarget {
|
|
1335
|
-
/// begin-style-key
|
|
1336
|
-
font: string /*pix {'no-gen':1} */;
|
|
1337
|
-
fontSize: string /*pix {'no-gen':1} */;
|
|
1338
|
-
fontWeight: string /*pix {'no-gen':1} */;
|
|
1339
|
-
fontStyle: string /*pix {'no-gen':1} */;
|
|
1340
|
-
textDecoration: string /*pix {'no-gen':1} */;
|
|
1341
|
-
fontFamily: string /*pix {'no-gen':1} */;
|
|
1342
|
-
display: string /*pix {'no-gen':1} */;
|
|
1343
|
-
visibility: string /*pix {'no-gen':1} */;
|
|
1344
|
-
opacity: string /*pix {'no-gen':1} */;
|
|
1345
|
-
color: string /*pix {'no-gen':1} */;
|
|
1346
|
-
textShadow: string /*pix {'no-gen':1} */;
|
|
1347
|
-
whiteSpace: string /*pix {'no-gen':1} */;
|
|
1348
|
-
zIndex: string /*pix {'no-gen':1} */;
|
|
1349
|
-
transformOrigin: string /*pix {'no-gen':1} */;
|
|
1350
|
-
transform: string /*pix {'no-gen':1} */;
|
|
1351
|
-
pointerEvents: string /*pix {'no-gen':1} */;
|
|
1352
|
-
PixuiRenderLayer: string /*pix {'no-gen':1} */;
|
|
1353
|
-
background: string /*pix {'no-gen':1} */;
|
|
1354
|
-
backgroundColor: string /*pix {'no-gen':1} */;
|
|
1355
|
-
backgroundImage: string /*pix {'no-gen':1} */;
|
|
1356
|
-
backgroundPosition: string /*pix {'no-gen':1} */;
|
|
1357
|
-
backgroundSize: string /*pix {'no-gen':1} */;
|
|
1358
|
-
backgroundOrigin: string /*pix {'no-gen':1} */;
|
|
1359
|
-
backgroundClip: string /*pix {'no-gen':1} */;
|
|
1360
|
-
backgroundAttachment: string /*pix {'no-gen':1} */;
|
|
1361
|
-
backgroundRepeat: string /*pix {'no-gen':1} */;
|
|
1362
|
-
maskImage: string /*pix {'no-gen':1} */;
|
|
1363
|
-
cursor: string /*pix {'no-gen':1} */;
|
|
1364
|
-
overflow: string /*pix {'no-gen':1} */;
|
|
1365
|
-
overflowStyle: string /*pix {'no-gen':1} */;
|
|
1366
|
-
width: string /*pix {'no-gen':1} */;
|
|
1367
|
-
height: string /*pix {'no-gen':1} */;
|
|
1368
|
-
left: string /*pix {'no-gen':1} */;
|
|
1369
|
-
right: string /*pix {'no-gen':1} */;
|
|
1370
|
-
top: string /*pix {'no-gen':1} */;
|
|
1371
|
-
bottom: string /*pix {'no-gen':1} */;
|
|
1372
|
-
minWidth: string /*pix {'no-gen':1} */;
|
|
1373
|
-
minHeight: string /*pix {'no-gen':1} */;
|
|
1374
|
-
maxWidth: string /*pix {'no-gen':1} */;
|
|
1375
|
-
maxHeight: string /*pix {'no-gen':1} */;
|
|
1376
|
-
margin: string /*pix {'no-gen':1} */;
|
|
1377
|
-
marginLeft: string /*pix {'no-gen':1} */;
|
|
1378
|
-
marginRight: string /*pix {'no-gen':1} */;
|
|
1379
|
-
marginTop: string /*pix {'no-gen':1} */;
|
|
1380
|
-
marginBottom: string /*pix {'no-gen':1} */;
|
|
1381
|
-
padding: string /*pix {'no-gen':1} */;
|
|
1382
|
-
paddingLeft: string /*pix {'no-gen':1} */;
|
|
1383
|
-
paddingRight: string /*pix {'no-gen':1} */;
|
|
1384
|
-
paddingTop: string /*pix {'no-gen':1} */;
|
|
1385
|
-
paddingBottom: string /*pix {'no-gen':1} */;
|
|
1386
|
-
alignContent: string /*pix {'no-gen':1} */;
|
|
1387
|
-
alignItems: string /*pix {'no-gen':1} */;
|
|
1388
|
-
alignSelf: string /*pix {'no-gen':1} */;
|
|
1389
|
-
flexWrap: string /*pix {'no-gen':1} */;
|
|
1390
|
-
justifyContent: string /*pix {'no-gen':1} */;
|
|
1391
|
-
flexGrow: string /*pix {'no-gen':1} */;
|
|
1392
|
-
flexShrink: string /*pix {'no-gen':1} */;
|
|
1393
|
-
aspectRatio: string /*pix {'no-gen':1} */;
|
|
1394
|
-
flexDirection: string /*pix {'no-gen':1} */;
|
|
1395
|
-
position: string /*pix {'no-gen':1} */;
|
|
1396
|
-
flexBasis: string /*pix {'no-gen':1} */;
|
|
1397
|
-
border: string /*pix {'no-gen':1} */;
|
|
1398
|
-
borderImage: string /*pix {'no-gen':1} */;
|
|
1399
|
-
borderImageSource: string /*pix {'no-gen':1} */;
|
|
1400
|
-
borderImageSlice: string /*pix {'no-gen':1} */;
|
|
1401
|
-
borderImageModel: string /*pix {'no-gen':1} */;
|
|
1402
|
-
borderImageRepeat: string /*pix {'no-gen':1} */;
|
|
1403
|
-
borderImagePosition: string /*pix {'no-gen':1} */;
|
|
1404
|
-
borderBottom: string /*pix {'no-gen':1} */;
|
|
1405
|
-
borderTop: string /*pix {'no-gen':1} */;
|
|
1406
|
-
borderLeft: string /*pix {'no-gen':1} */;
|
|
1407
|
-
borderRight: string /*pix {'no-gen':1} */;
|
|
1408
|
-
borderWidth: string /*pix {'no-gen':1} */;
|
|
1409
|
-
borderTopWidth: string /*pix {'no-gen':1} */;
|
|
1410
|
-
borderRightWidth: string /*pix {'no-gen':1} */;
|
|
1411
|
-
borderBottomWidth: string /*pix {'no-gen':1} */;
|
|
1412
|
-
borderLeftWidth: string /*pix {'no-gen':1} */;
|
|
1413
|
-
borderColor: string /*pix {'no-gen':1} */;
|
|
1414
|
-
borderTopColor: string /*pix {'no-gen':1} */;
|
|
1415
|
-
borderRightColor: string /*pix {'no-gen':1} */;
|
|
1416
|
-
borderBottomColor: string /*pix {'no-gen':1} */;
|
|
1417
|
-
borderLeftColor: string /*pix {'no-gen':1} */;
|
|
1418
|
-
borderStyle: string /*pix {'no-gen':1} */;
|
|
1419
|
-
borderTopStyle: string /*pix {'no-gen':1} */;
|
|
1420
|
-
borderRightStyle: string /*pix {'no-gen':1} */;
|
|
1421
|
-
borderBottomStyle: string /*pix {'no-gen':1} */;
|
|
1422
|
-
borderLeftStyle: string /*pix {'no-gen':1} */;
|
|
1423
|
-
borderRadius: string /*pix {'no-gen':1} */;
|
|
1424
|
-
borderRadiusX: string /*pix {'no-gen':1} */;
|
|
1425
|
-
borderRadiusY: string /*pix {'no-gen':1} */;
|
|
1426
|
-
borderTopLeftRadius: string /*pix {'no-gen':1} */;
|
|
1427
|
-
borderTopRightRadius: string /*pix {'no-gen':1} */;
|
|
1428
|
-
borderBottomLeftRadius: string /*pix {'no-gen':1} */;
|
|
1429
|
-
borderBottomRightRadius: string /*pix {'no-gen':1} */;
|
|
1430
|
-
borderTopLeftRadiusX: string /*pix {'no-gen':1} */;
|
|
1431
|
-
borderTopRightRadiusX: string /*pix {'no-gen':1} */;
|
|
1432
|
-
borderBottomRightRadiusX: string /*pix {'no-gen':1} */;
|
|
1433
|
-
borderBottomLeftRadiusX: string /*pix {'no-gen':1} */;
|
|
1434
|
-
borderTopLeftRadiusY: string /*pix {'no-gen':1} */;
|
|
1435
|
-
borderTopRightRadiusY: string /*pix {'no-gen':1} */;
|
|
1436
|
-
borderBottomRightRadiusY: string /*pix {'no-gen':1} */;
|
|
1437
|
-
borderBottomLeftRadiusY: string /*pix {'no-gen':1} */;
|
|
1438
|
-
outline: string /*pix {'no-gen':1} */;
|
|
1439
|
-
outlineWidth: string /*pix {'no-gen':1} */;
|
|
1440
|
-
outlineColor: string /*pix {'no-gen':1} */;
|
|
1441
|
-
outlineStyle: string /*pix {'no-gen':1} */;
|
|
1442
|
-
animation: string /*pix {'no-gen':1} */;
|
|
1443
|
-
animationName: string /*pix {'no-gen':1} */;
|
|
1444
|
-
animationDuration: string /*pix {'no-gen':1} */;
|
|
1445
|
-
animationTimingFunction: string /*pix {'no-gen':1} */;
|
|
1446
|
-
animationIterationCount: string /*pix {'no-gen':1} */;
|
|
1447
|
-
animationDelay: string /*pix {'no-gen':1} */;
|
|
1448
|
-
animationDirection: string /*pix {'no-gen':1} */;
|
|
1449
|
-
animationPlayState: string /*pix {'no-gen':1} */;
|
|
1450
|
-
animationFillMode: string /*pix {'no-gen':1} */;
|
|
1451
|
-
transition: string /*pix {'no-gen':1} */;
|
|
1452
|
-
textStroke: string /*pix {'no-gen':1} */;
|
|
1453
|
-
textStrokeColor: string /*pix {'no-gen':1} */;
|
|
1454
|
-
textStrokeWidth: string /*pix {'no-gen':1} */;
|
|
1455
|
-
lineClamp: string /*pix {'no-gen':1} */;
|
|
1456
|
-
/// end-style-key
|
|
1457
|
-
cssText: string;
|
|
1458
|
-
setProperty(property: string, value: string): void;
|
|
1459
|
-
|
|
1460
|
-
getPropertyValue(property: string): string;
|
|
1461
|
-
}
|
|
1139
|
+
getDuration(inFrames: boolean): number;
|
|
1462
1140
|
|
|
1463
|
-
|
|
1464
|
-
prototype: CSSStyleDeclaration;
|
|
1465
|
-
new (element: HTMLElement, pseudoElt: HTMLElement): CSSStyleDeclaration;
|
|
1466
|
-
};
|
|
1141
|
+
setSpeed(sp: number): void;
|
|
1467
1142
|
|
|
1468
|
-
|
|
1469
|
-
(time: number): void;
|
|
1470
|
-
}
|
|
1143
|
+
setProperty(...args: any[]): number;
|
|
1471
1144
|
|
|
1472
|
-
|
|
1473
|
-
gen: binding
|
|
1474
|
-
cpp-class: H5BrowserLocation
|
|
1475
|
-
*/
|
|
1476
|
-
interface Location {
|
|
1477
|
-
/**
|
|
1478
|
-
* Returns the Location object's URL's fragment (includes leading "#" if non-empty).
|
|
1479
|
-
*
|
|
1480
|
-
* Can be set, to navigate to the same URL with a changed fragment (ignores leading "#").
|
|
1481
|
-
*/
|
|
1482
|
-
hash: string;
|
|
1483
|
-
/**
|
|
1484
|
-
* Returns the Location object's URL's host and port (if different from the default port for the scheme).
|
|
1485
|
-
*
|
|
1486
|
-
* Can be set, to navigate to the same URL with a changed host and port.
|
|
1487
|
-
*/
|
|
1488
|
-
host: string;
|
|
1489
|
-
/**
|
|
1490
|
-
* Returns the Location object's URL's host name.
|
|
1491
|
-
*
|
|
1492
|
-
* Can be set, to navigate to the same URL with a changed host name.
|
|
1493
|
-
*/
|
|
1494
|
-
hostname: string;
|
|
1495
|
-
/**
|
|
1496
|
-
* Returns the Location object's URL.
|
|
1497
|
-
*
|
|
1498
|
-
* Can be set, to navigate to the given URL.
|
|
1499
|
-
*/
|
|
1500
|
-
href: string;
|
|
1501
|
-
/**
|
|
1502
|
-
* Returns the Location object's URL's path.
|
|
1503
|
-
*
|
|
1504
|
-
* Can be set, to navigate to the same URL with a changed path.
|
|
1505
|
-
*/
|
|
1506
|
-
pathname: string;
|
|
1507
|
-
/**
|
|
1508
|
-
* Returns the Location object's URL's port.
|
|
1509
|
-
*
|
|
1510
|
-
* Can be set, to navigate to the same URL with a changed port.
|
|
1511
|
-
*/
|
|
1512
|
-
port: string;
|
|
1513
|
-
/**
|
|
1514
|
-
* Returns the Location object's URL's scheme.
|
|
1515
|
-
*
|
|
1516
|
-
* Can be set, to navigate to the same URL with a changed scheme.
|
|
1517
|
-
*/
|
|
1518
|
-
protocol: string;
|
|
1519
|
-
/**
|
|
1520
|
-
* Returns the Location object's URL's query (includes leading "?" if non-empty).
|
|
1521
|
-
*
|
|
1522
|
-
* Can be set, to navigate to the same URL with a changed query (ignores leading "?").
|
|
1523
|
-
*/
|
|
1524
|
-
search: string;
|
|
1525
|
-
|
|
1526
|
-
/**
|
|
1527
|
-
* Navigates to the given URL.
|
|
1528
|
-
*/
|
|
1529
|
-
assign(url: string): void;
|
|
1530
|
-
|
|
1531
|
-
/**
|
|
1532
|
-
* Reloads the current page.
|
|
1533
|
-
*/
|
|
1534
|
-
reload(): void;
|
|
1535
|
-
|
|
1536
|
-
/**
|
|
1537
|
-
* Removes the current page from the session history and navigates to the given URL.
|
|
1538
|
-
*/
|
|
1539
|
-
replace(url: string): void;
|
|
1540
|
-
|
|
1541
|
-
back(): void;
|
|
1542
|
-
|
|
1543
|
-
forward(): void;
|
|
1544
|
-
|
|
1545
|
-
go(step: number): void;
|
|
1546
|
-
|
|
1547
|
-
pushState(state: any, title: string, url: string): void;
|
|
1548
|
-
|
|
1549
|
-
now(): any;
|
|
1550
|
-
}
|
|
1145
|
+
gotoAndPlay(v: number, isFrame: boolean): void;
|
|
1551
1146
|
|
|
1552
|
-
|
|
1553
|
-
gen: binding
|
|
1554
|
-
cpp-class: H5DebugConsole
|
|
1555
|
-
end-def: WithName
|
|
1556
|
-
*/
|
|
1557
|
-
interface Console {
|
|
1558
|
-
enableTrace(b: boolean): void;
|
|
1147
|
+
gotoAndStop(v: number, isFrame: boolean): void;
|
|
1559
1148
|
|
|
1560
|
-
|
|
1561
|
-
debug(msg: string, ...arguments: any[]): number;
|
|
1149
|
+
enableSimd(enable: boolean): void;
|
|
1562
1150
|
|
|
1563
|
-
|
|
1151
|
+
addEventListener<K extends keyof LottieEventHandlersEventMap>(type: K, listener: (this: HTMLLottieElement, ev: LottieEventHandlersEventMap[K]) => any): void;
|
|
1564
1152
|
|
|
1565
|
-
|
|
1153
|
+
removeEventListener<K extends keyof LottieEventHandlersEventMap>(type: K, listener: (this: HTMLLottieElement, ev: LottieEventHandlersEventMap[K]) => any): void;
|
|
1154
|
+
}
|
|
1566
1155
|
|
|
1567
|
-
|
|
1156
|
+
/*pix
|
|
1157
|
+
gen: binding
|
|
1158
|
+
cpp-class: H5ElementInput
|
|
1159
|
+
with-handlers: InputEventHandlers
|
|
1160
|
+
*/
|
|
1161
|
+
interface HTMLInputElement extends HTMLElement, InputEventHandlers {
|
|
1162
|
+
placeholder: string;
|
|
1163
|
+
value: string;
|
|
1164
|
+
accept: string;
|
|
1165
|
+
multiple: boolean;
|
|
1166
|
+
readonly files: File[];
|
|
1167
|
+
|
|
1168
|
+
updateCursorPosition(v: number): void;
|
|
1169
|
+
updateSelectionHead(v: number): void;
|
|
1170
|
+
updateSelectionTail(v: number): void;
|
|
1171
|
+
|
|
1172
|
+
copy(): void;
|
|
1173
|
+
paste(): void;
|
|
1174
|
+
cut(): void;
|
|
1175
|
+
|
|
1176
|
+
addEventListener<K extends keyof InputEventHandlersEventMap>(type: K, listener: (this: HTMLInputElement, ev: InputEventHandlersEventMap[K]) => any): void;
|
|
1177
|
+
|
|
1178
|
+
removeEventListener<K extends keyof InputEventHandlersEventMap>(type: K, listener: (this: HTMLInputElement, ev: InputEventHandlersEventMap[K]) => any): void;
|
|
1179
|
+
}
|
|
1180
|
+
|
|
1181
|
+
/*pix
|
|
1182
|
+
gen: binding
|
|
1183
|
+
cpp-class: H5ElementTextArea
|
|
1184
|
+
with-handlers: InputEventHandlers
|
|
1185
|
+
*/
|
|
1186
|
+
interface HTMLTextAreaElement extends HTMLElement, InputEventHandlers {
|
|
1187
|
+
placeholder: string;
|
|
1188
|
+
value: string;
|
|
1568
1189
|
|
|
1569
|
-
|
|
1570
|
-
|
|
1190
|
+
updateCursorPosition(x: number, y: number): void;
|
|
1191
|
+
updateSelectionHead(x: number, y: number): void;
|
|
1192
|
+
updateSelectionTail(x: number, y: number): void;
|
|
1571
1193
|
|
|
1572
|
-
|
|
1573
|
-
// onDOMContentLoaded只能用addEventListener添加
|
|
1574
|
-
// onDOMContentLoaded: ((this: WindowEventHandlers, ev: Event) => any) | null;
|
|
1575
|
-
|
|
1576
|
-
onload: ((this: WindowEventHandlers, ev: Event) => any) | null;
|
|
1577
|
-
onunload: ((this: WindowEventHandlers, ev: Event) => any) | null;
|
|
1578
|
-
onbeforeunload: ((this: WindowEventHandlers, ev: Event) => any) | null;
|
|
1579
|
-
onclose: ((this: WindowEventHandlers, ev: CloseEvent) => any) | null;
|
|
1580
|
-
onclick: ((this: WindowEventHandlers, ev: MouseClickEvent) => any) | null;
|
|
1581
|
-
onmessage: ((this: WindowEventHandlers, ev: MessageEvent) => any) | null;
|
|
1582
|
-
// onpopstate: ((this: WindowEventHandlers, ev: PopStateEvent) => any) | null;
|
|
1583
|
-
onerror: ((this: WindowEventHandlers, ev: ErrorEvent) => any) | null;
|
|
1584
|
-
onresize: ((this: WindowEventHandlers, ev: Event) => any) | null;
|
|
1585
|
-
onscreenresize: ((this: WindowEventHandlers, ev: Event) => any) | null;
|
|
1586
|
-
}
|
|
1194
|
+
copy(): void;
|
|
1587
1195
|
|
|
1588
|
-
|
|
1589
|
-
DOMContentLoaded: Event;
|
|
1590
|
-
load: Event;
|
|
1591
|
-
unload: Event;
|
|
1592
|
-
beforeunload: Event;
|
|
1593
|
-
close: CloseEvent;
|
|
1594
|
-
click: Event;
|
|
1595
|
-
message: MessageEvent;
|
|
1596
|
-
error: ErrorEvent;
|
|
1597
|
-
resize: Event;
|
|
1598
|
-
screenresize: Event;
|
|
1599
|
-
}
|
|
1196
|
+
paste(): void;
|
|
1600
1197
|
|
|
1601
|
-
|
|
1602
|
-
onplay: ((this: AudioEventHandlers, ev: Event) => any) | null;
|
|
1603
|
-
onplaying: ((this: AudioEventHandlers, ev: Event) => any) | null;
|
|
1604
|
-
onended: ((this: AudioEventHandlers, ev: Event) => any) | null;
|
|
1605
|
-
onpause: ((this: AudioEventHandlers, ev: Event) => any) | null;
|
|
1606
|
-
onseeking: ((this: AudioEventHandlers, ev: Event) => any) | null;
|
|
1607
|
-
onseeked: ((this: AudioEventHandlers, ev: Event) => any) | null;
|
|
1608
|
-
onerror: ((this: AudioEventHandlers, ev: ErrorEvent) => any) | null;
|
|
1609
|
-
onwaiting: ((this: AudioEventHandlers, ev: ErrorEvent) => any) | null;
|
|
1610
|
-
oncanplay: ((this: AudioEventHandlers, ev: ErrorEvent) => any) | null;
|
|
1611
|
-
onloadstart: ((this: AudioEventHandlers, ev: ErrorEvent) => any) | null;
|
|
1612
|
-
onloadeddata: ((this: AudioEventHandlers, ev: ErrorEvent) => any) | null;
|
|
1613
|
-
onfirstframe: ((this: AudioEventHandlers, ev: ErrorEvent) => any) | null;
|
|
1614
|
-
}
|
|
1198
|
+
cut(): void;
|
|
1615
1199
|
|
|
1616
|
-
|
|
1617
|
-
seeking: Event;
|
|
1618
|
-
pause: Event;
|
|
1619
|
-
play: Event;
|
|
1620
|
-
playing: Event;
|
|
1621
|
-
ended: Event;
|
|
1622
|
-
seeked: Event;
|
|
1623
|
-
}
|
|
1200
|
+
addEventListener<K extends keyof InputEventHandlersEventMap>(type: K, listener: (this: HTMLTextAreaElement, ev: InputEventHandlersEventMap[K]) => any): void;
|
|
1624
1201
|
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
onplaying: ((this: VideoEventHandlers, ev: Event) => any) | null;
|
|
1628
|
-
onended: ((this: VideoEventHandlers, ev: Event) => any) | null;
|
|
1629
|
-
onpause: ((this: VideoEventHandlers, ev: Event) => any) | null;
|
|
1630
|
-
onseeking: ((this: VideoEventHandlers, ev: Event) => any) | null;
|
|
1631
|
-
onseeked: ((this: VideoEventHandlers, ev: Event) => any) | null;
|
|
1632
|
-
onerror: ((this: VideoEventHandlers, ev: ErrorEvent) => any) | null;
|
|
1633
|
-
onwaiting: ((this: AudioEventHandlers, ev: ErrorEvent) => any) | null;
|
|
1634
|
-
oncanplay: ((this: AudioEventHandlers, ev: ErrorEvent) => any) | null;
|
|
1635
|
-
onloadstart: ((this: AudioEventHandlers, ev: ErrorEvent) => any) | null;
|
|
1636
|
-
onloadeddata: ((this: AudioEventHandlers, ev: ErrorEvent) => any) | null;
|
|
1637
|
-
onfirstframe: ((this: AudioEventHandlers, ev: ErrorEvent) => any) | null;
|
|
1638
|
-
}
|
|
1202
|
+
removeEventListener<K extends keyof InputEventHandlersEventMap>(type: K, listener: (this: HTMLTextAreaElement, ev: InputEventHandlersEventMap[K]) => any): void;
|
|
1203
|
+
}
|
|
1639
1204
|
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
ended: Event;
|
|
1646
|
-
seeked: Event;
|
|
1647
|
-
}
|
|
1205
|
+
/*pix
|
|
1206
|
+
gen: binding
|
|
1207
|
+
cpp-class: H5ElementFragment
|
|
1208
|
+
*/
|
|
1209
|
+
interface HTMLElementFragment extends HTMLElement {}
|
|
1648
1210
|
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1211
|
+
/*pix
|
|
1212
|
+
gen: binding
|
|
1213
|
+
cpp-class: H5ElementLink
|
|
1214
|
+
*/
|
|
1215
|
+
interface HTMLLinkElement extends HTMLElement {}
|
|
1653
1216
|
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1217
|
+
/*pix
|
|
1218
|
+
gen: binding
|
|
1219
|
+
cpp-class: H5ElementSlot
|
|
1220
|
+
*/
|
|
1221
|
+
interface HTMLSlotElement extends HTMLElement {
|
|
1222
|
+
src: string;
|
|
1223
|
+
attachment: number;
|
|
1224
|
+
}
|
|
1225
|
+
|
|
1226
|
+
/*pix
|
|
1227
|
+
gen: binding
|
|
1228
|
+
cpp-class: H5ElementCef
|
|
1229
|
+
with-handlers: CefEventHandlers
|
|
1230
|
+
cpp-precompile: BUILD_WITH_PIXCEF
|
|
1231
|
+
*/
|
|
1232
|
+
interface HTMLCefElement extends HTMLElement {
|
|
1233
|
+
src: string;
|
|
1234
|
+
executeJS(jsCode: string): number;
|
|
1235
|
+
addEventListener<K extends keyof CefEventHandlersEventMap>(type: K, listener: (this: HTMLCefElement, ev: CefEventHandlersEventMap[K]) => any): void;
|
|
1236
|
+
removeEventListener<K extends keyof CefEventHandlersEventMap>(type: K, listener: (this: HTMLCefElement, ev: CefEventHandlersEventMap[K]) => any): void;
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1239
|
+
/*pix
|
|
1240
|
+
gen: binding
|
|
1241
|
+
cpp-class: H5ElementTextField
|
|
1242
|
+
*/
|
|
1243
|
+
interface HTMLTextFieldElement extends HTMLDivElement {
|
|
1244
|
+
calcHeight: number;
|
|
1245
|
+
}
|
|
1658
1246
|
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1247
|
+
/*pix
|
|
1248
|
+
gen: binding
|
|
1249
|
+
cpp-class: H5Document
|
|
1250
|
+
*/
|
|
1251
|
+
interface Document extends Node {
|
|
1252
|
+
readonly nodeType: number /* value:9 */;
|
|
1253
|
+
body: HTMLElement;
|
|
1254
|
+
head: HTMLElement;
|
|
1255
|
+
title: string;
|
|
1256
|
+
readonly defaultView: Window;
|
|
1257
|
+
readonly documentElement: HTMLElement;
|
|
1258
|
+
readonly activeElement: HTMLElement;
|
|
1259
|
+
hidden: boolean;
|
|
1260
|
+
visibilityState: string;
|
|
1261
|
+
styleSheets: CSSStyleSheet[];
|
|
1262
|
+
|
|
1263
|
+
createEvent(type: string): Event;
|
|
1264
|
+
|
|
1265
|
+
createElement(tagName: string): HTMLElement;
|
|
1266
|
+
|
|
1267
|
+
createComment(text: string): HTMLElement;
|
|
1268
|
+
|
|
1269
|
+
createElementNS(namespace: string, tagName: string): HTMLElement;
|
|
1270
|
+
|
|
1271
|
+
createDocumentFragment(): HTMLElementFragment;
|
|
1272
|
+
|
|
1273
|
+
/**
|
|
1274
|
+
* Creates a text string from the specified value.
|
|
1275
|
+
* @param data String that specifies the nodeValue property of the text node.
|
|
1276
|
+
*/
|
|
1277
|
+
createTextNode(data: string): Text;
|
|
1278
|
+
|
|
1279
|
+
/**
|
|
1280
|
+
* Returns a reference to the first object with the specified value of the ID attribute.
|
|
1281
|
+
* @param elementId String that specifies the ID value.
|
|
1282
|
+
*/
|
|
1283
|
+
getElementById(elementId: string): HTMLElement | null;
|
|
1284
|
+
|
|
1285
|
+
/**
|
|
1286
|
+
* Returns a HTMLCollection of the elements in the object on which the method was invoked (a document or an element) that have all the classes given by classNames. The classNames argument is interpreted as a space-separated list of classes.
|
|
1287
|
+
*/
|
|
1288
|
+
getElementsByClassName(classNames: string): HTMLElement[];
|
|
1289
|
+
|
|
1290
|
+
/**
|
|
1291
|
+
* Retrieves a collection of objects based on the specified element name.
|
|
1292
|
+
* @param name Specifies the name of an element.
|
|
1293
|
+
*/
|
|
1294
|
+
getElementsByTagName(qualifiedName: string): HTMLElement[];
|
|
1295
|
+
|
|
1296
|
+
/**
|
|
1297
|
+
* Returns the first element that is a descendant of node that matches selectors.
|
|
1298
|
+
*/
|
|
1299
|
+
querySelector<E extends HTMLElement = HTMLElement>(selectors: string): E | null;
|
|
1300
|
+
|
|
1301
|
+
/**
|
|
1302
|
+
* Returns all element descendants of node that match selectors.
|
|
1303
|
+
*/
|
|
1304
|
+
querySelectorAll<E extends HTMLElement = HTMLElement>(selectors: string): Array<E>;
|
|
1305
|
+
}
|
|
1306
|
+
|
|
1307
|
+
/*pix
|
|
1308
|
+
gen: binding
|
|
1309
|
+
cpp-class: H5TokenList
|
|
1310
|
+
*/
|
|
1311
|
+
interface DOMTokenList {
|
|
1312
|
+
readonly length: number;
|
|
1313
|
+
value: string;
|
|
1663
1314
|
|
|
1664
|
-
|
|
1665
|
-
change: Event;
|
|
1666
|
-
input: Event;
|
|
1667
|
-
}
|
|
1315
|
+
item(index: number): string | null;
|
|
1668
1316
|
|
|
1669
|
-
|
|
1670
|
-
onmessage: ((this: ScriptExternalEventHandlers, ev: MessageEvent) => any) | null;
|
|
1671
|
-
}
|
|
1317
|
+
contains(token: string): boolean;
|
|
1672
1318
|
|
|
1673
|
-
|
|
1674
|
-
message: MessageEvent;
|
|
1675
|
-
}
|
|
1319
|
+
replace(oldValue: string, newValue: string): boolean;
|
|
1676
1320
|
|
|
1677
|
-
|
|
1678
|
-
onjsresult: ((this: CefEventHandlers, ev: CefExecJSEvent) => any) | null;
|
|
1679
|
-
}
|
|
1321
|
+
toggle(token: string, force?: boolean): boolean;
|
|
1680
1322
|
|
|
1681
|
-
|
|
1682
|
-
jsresult: CefExecJSEvent;
|
|
1683
|
-
}
|
|
1323
|
+
entries(): any;
|
|
1684
1324
|
|
|
1685
|
-
|
|
1686
|
-
gen: binding
|
|
1687
|
-
cpp-class: H5Screen
|
|
1688
|
-
*/
|
|
1689
|
-
interface Screen {
|
|
1690
|
-
readonly height: number;
|
|
1691
|
-
readonly width: number;
|
|
1692
|
-
}
|
|
1325
|
+
keys(): string[];
|
|
1693
1326
|
|
|
1694
|
-
|
|
1695
|
-
gen: binding
|
|
1696
|
-
cpp-class: H5Window
|
|
1697
|
-
with-handlers: WindowEventHandlers
|
|
1698
|
-
*/
|
|
1699
|
-
interface Window extends EventTarget, WindowEventHandlers {
|
|
1700
|
-
readonly innerHeight: number;
|
|
1701
|
-
readonly innerWidth: number;
|
|
1702
|
-
// readonly document: Document;
|
|
1703
|
-
id: number;
|
|
1704
|
-
location: Location;
|
|
1705
|
-
localStorage: Storage;
|
|
1706
|
-
history: Location;
|
|
1707
|
-
opener: number;
|
|
1708
|
-
readonly scrollX: number;
|
|
1709
|
-
readonly scrollY: number;
|
|
1710
|
-
readonly screen: Screen;
|
|
1711
|
-
httpVersion: number;
|
|
1712
|
-
netEncodingMode: string;
|
|
1713
|
-
netThreadMode: string;
|
|
1714
|
-
netTimeout: number;
|
|
1715
|
-
targetApi: number;
|
|
1327
|
+
values(): string[];
|
|
1716
1328
|
|
|
1717
|
-
|
|
1329
|
+
add(...args: string[]): void;
|
|
1718
1330
|
|
|
1719
|
-
|
|
1331
|
+
remove(...args: string[]): void;
|
|
1332
|
+
}
|
|
1720
1333
|
|
|
1721
|
-
|
|
1334
|
+
/*pix
|
|
1335
|
+
gen: binding
|
|
1336
|
+
*/
|
|
1337
|
+
/** An object that is a CSS declaration block, and exposes style information and various style-related methods and properties. */
|
|
1338
|
+
interface CSSStyleDeclaration extends EventTarget {
|
|
1339
|
+
/// begin-style-key
|
|
1340
|
+
font: string /*pix {'no-gen':1} */;
|
|
1341
|
+
fontSize: string /*pix {'no-gen':1} */;
|
|
1342
|
+
fontWeight: string /*pix {'no-gen':1} */;
|
|
1343
|
+
fontStyle: string /*pix {'no-gen':1} */;
|
|
1344
|
+
textDecoration: string /*pix {'no-gen':1} */;
|
|
1345
|
+
fontFamily: string /*pix {'no-gen':1} */;
|
|
1346
|
+
display: string /*pix {'no-gen':1} */;
|
|
1347
|
+
visibility: string /*pix {'no-gen':1} */;
|
|
1348
|
+
opacity: string /*pix {'no-gen':1} */;
|
|
1349
|
+
color: string /*pix {'no-gen':1} */;
|
|
1350
|
+
textShadow: string /*pix {'no-gen':1} */;
|
|
1351
|
+
whiteSpace: string /*pix {'no-gen':1} */;
|
|
1352
|
+
zIndex: string /*pix {'no-gen':1} */;
|
|
1353
|
+
transformOrigin: string /*pix {'no-gen':1} */;
|
|
1354
|
+
transform: string /*pix {'no-gen':1} */;
|
|
1355
|
+
pointerEvents: string /*pix {'no-gen':1} */;
|
|
1356
|
+
PixuiRenderLayer: string /*pix {'no-gen':1} */;
|
|
1357
|
+
background: string /*pix {'no-gen':1} */;
|
|
1358
|
+
backgroundColor: string /*pix {'no-gen':1} */;
|
|
1359
|
+
backgroundImage: string /*pix {'no-gen':1} */;
|
|
1360
|
+
backgroundPosition: string /*pix {'no-gen':1} */;
|
|
1361
|
+
backgroundSize: string /*pix {'no-gen':1} */;
|
|
1362
|
+
backgroundOrigin: string /*pix {'no-gen':1} */;
|
|
1363
|
+
backgroundClip: string /*pix {'no-gen':1} */;
|
|
1364
|
+
backgroundAttachment: string /*pix {'no-gen':1} */;
|
|
1365
|
+
backgroundRepeat: string /*pix {'no-gen':1} */;
|
|
1366
|
+
maskImage: string /*pix {'no-gen':1} */;
|
|
1367
|
+
cursor: string /*pix {'no-gen':1} */;
|
|
1368
|
+
overflow: string /*pix {'no-gen':1} */;
|
|
1369
|
+
overflowStyle: string /*pix {'no-gen':1} */;
|
|
1370
|
+
width: string /*pix {'no-gen':1} */;
|
|
1371
|
+
height: string /*pix {'no-gen':1} */;
|
|
1372
|
+
left: string /*pix {'no-gen':1} */;
|
|
1373
|
+
right: string /*pix {'no-gen':1} */;
|
|
1374
|
+
top: string /*pix {'no-gen':1} */;
|
|
1375
|
+
bottom: string /*pix {'no-gen':1} */;
|
|
1376
|
+
minWidth: string /*pix {'no-gen':1} */;
|
|
1377
|
+
minHeight: string /*pix {'no-gen':1} */;
|
|
1378
|
+
maxWidth: string /*pix {'no-gen':1} */;
|
|
1379
|
+
maxHeight: string /*pix {'no-gen':1} */;
|
|
1380
|
+
margin: string /*pix {'no-gen':1} */;
|
|
1381
|
+
marginLeft: string /*pix {'no-gen':1} */;
|
|
1382
|
+
marginRight: string /*pix {'no-gen':1} */;
|
|
1383
|
+
marginTop: string /*pix {'no-gen':1} */;
|
|
1384
|
+
marginBottom: string /*pix {'no-gen':1} */;
|
|
1385
|
+
padding: string /*pix {'no-gen':1} */;
|
|
1386
|
+
paddingLeft: string /*pix {'no-gen':1} */;
|
|
1387
|
+
paddingRight: string /*pix {'no-gen':1} */;
|
|
1388
|
+
paddingTop: string /*pix {'no-gen':1} */;
|
|
1389
|
+
paddingBottom: string /*pix {'no-gen':1} */;
|
|
1390
|
+
alignContent: string /*pix {'no-gen':1} */;
|
|
1391
|
+
alignItems: string /*pix {'no-gen':1} */;
|
|
1392
|
+
alignSelf: string /*pix {'no-gen':1} */;
|
|
1393
|
+
flexWrap: string /*pix {'no-gen':1} */;
|
|
1394
|
+
justifyContent: string /*pix {'no-gen':1} */;
|
|
1395
|
+
flexGrow: string /*pix {'no-gen':1} */;
|
|
1396
|
+
flexShrink: string /*pix {'no-gen':1} */;
|
|
1397
|
+
aspectRatio: string /*pix {'no-gen':1} */;
|
|
1398
|
+
flexDirection: string /*pix {'no-gen':1} */;
|
|
1399
|
+
position: string /*pix {'no-gen':1} */;
|
|
1400
|
+
flexBasis: string /*pix {'no-gen':1} */;
|
|
1401
|
+
border: string /*pix {'no-gen':1} */;
|
|
1402
|
+
borderImage: string /*pix {'no-gen':1} */;
|
|
1403
|
+
borderImageSource: string /*pix {'no-gen':1} */;
|
|
1404
|
+
borderImageSlice: string /*pix {'no-gen':1} */;
|
|
1405
|
+
borderImageModel: string /*pix {'no-gen':1} */;
|
|
1406
|
+
borderImageRepeat: string /*pix {'no-gen':1} */;
|
|
1407
|
+
borderImagePosition: string /*pix {'no-gen':1} */;
|
|
1408
|
+
borderBottom: string /*pix {'no-gen':1} */;
|
|
1409
|
+
borderTop: string /*pix {'no-gen':1} */;
|
|
1410
|
+
borderLeft: string /*pix {'no-gen':1} */;
|
|
1411
|
+
borderRight: string /*pix {'no-gen':1} */;
|
|
1412
|
+
borderWidth: string /*pix {'no-gen':1} */;
|
|
1413
|
+
borderTopWidth: string /*pix {'no-gen':1} */;
|
|
1414
|
+
borderRightWidth: string /*pix {'no-gen':1} */;
|
|
1415
|
+
borderBottomWidth: string /*pix {'no-gen':1} */;
|
|
1416
|
+
borderLeftWidth: string /*pix {'no-gen':1} */;
|
|
1417
|
+
borderColor: string /*pix {'no-gen':1} */;
|
|
1418
|
+
borderTopColor: string /*pix {'no-gen':1} */;
|
|
1419
|
+
borderRightColor: string /*pix {'no-gen':1} */;
|
|
1420
|
+
borderBottomColor: string /*pix {'no-gen':1} */;
|
|
1421
|
+
borderLeftColor: string /*pix {'no-gen':1} */;
|
|
1422
|
+
borderStyle: string /*pix {'no-gen':1} */;
|
|
1423
|
+
borderTopStyle: string /*pix {'no-gen':1} */;
|
|
1424
|
+
borderRightStyle: string /*pix {'no-gen':1} */;
|
|
1425
|
+
borderBottomStyle: string /*pix {'no-gen':1} */;
|
|
1426
|
+
borderLeftStyle: string /*pix {'no-gen':1} */;
|
|
1427
|
+
borderRadius: string /*pix {'no-gen':1} */;
|
|
1428
|
+
borderRadiusX: string /*pix {'no-gen':1} */;
|
|
1429
|
+
borderRadiusY: string /*pix {'no-gen':1} */;
|
|
1430
|
+
borderTopLeftRadius: string /*pix {'no-gen':1} */;
|
|
1431
|
+
borderTopRightRadius: string /*pix {'no-gen':1} */;
|
|
1432
|
+
borderBottomLeftRadius: string /*pix {'no-gen':1} */;
|
|
1433
|
+
borderBottomRightRadius: string /*pix {'no-gen':1} */;
|
|
1434
|
+
borderTopLeftRadiusX: string /*pix {'no-gen':1} */;
|
|
1435
|
+
borderTopRightRadiusX: string /*pix {'no-gen':1} */;
|
|
1436
|
+
borderBottomRightRadiusX: string /*pix {'no-gen':1} */;
|
|
1437
|
+
borderBottomLeftRadiusX: string /*pix {'no-gen':1} */;
|
|
1438
|
+
borderTopLeftRadiusY: string /*pix {'no-gen':1} */;
|
|
1439
|
+
borderTopRightRadiusY: string /*pix {'no-gen':1} */;
|
|
1440
|
+
borderBottomRightRadiusY: string /*pix {'no-gen':1} */;
|
|
1441
|
+
borderBottomLeftRadiusY: string /*pix {'no-gen':1} */;
|
|
1442
|
+
outline: string /*pix {'no-gen':1} */;
|
|
1443
|
+
outlineWidth: string /*pix {'no-gen':1} */;
|
|
1444
|
+
outlineColor: string /*pix {'no-gen':1} */;
|
|
1445
|
+
outlineStyle: string /*pix {'no-gen':1} */;
|
|
1446
|
+
animation: string /*pix {'no-gen':1} */;
|
|
1447
|
+
animationName: string /*pix {'no-gen':1} */;
|
|
1448
|
+
animationDuration: string /*pix {'no-gen':1} */;
|
|
1449
|
+
animationTimingFunction: string /*pix {'no-gen':1} */;
|
|
1450
|
+
animationIterationCount: string /*pix {'no-gen':1} */;
|
|
1451
|
+
animationDelay: string /*pix {'no-gen':1} */;
|
|
1452
|
+
animationDirection: string /*pix {'no-gen':1} */;
|
|
1453
|
+
animationPlayState: string /*pix {'no-gen':1} */;
|
|
1454
|
+
animationFillMode: string /*pix {'no-gen':1} */;
|
|
1455
|
+
transition: string /*pix {'no-gen':1} */;
|
|
1456
|
+
textStroke: string /*pix {'no-gen':1} */;
|
|
1457
|
+
textStrokeColor: string /*pix {'no-gen':1} */;
|
|
1458
|
+
textStrokeWidth: string /*pix {'no-gen':1} */;
|
|
1459
|
+
lineClamp: string /*pix {'no-gen':1} */;
|
|
1460
|
+
/// end-style-key
|
|
1461
|
+
cssText: string;
|
|
1462
|
+
setProperty(property: string, value: string): void;
|
|
1463
|
+
|
|
1464
|
+
getPropertyValue(property: string): string;
|
|
1465
|
+
}
|
|
1466
|
+
|
|
1467
|
+
declare let CSSStyleDeclaration: {
|
|
1468
|
+
prototype: CSSStyleDeclaration;
|
|
1469
|
+
new (element: HTMLElement, pseudoElt: HTMLElement): CSSStyleDeclaration;
|
|
1470
|
+
};
|
|
1471
|
+
|
|
1472
|
+
interface FrameRequestCallback {
|
|
1473
|
+
(time: number): void;
|
|
1474
|
+
}
|
|
1475
|
+
|
|
1476
|
+
/*pix
|
|
1477
|
+
gen: binding
|
|
1478
|
+
cpp-class: H5BrowserLocation
|
|
1479
|
+
*/
|
|
1480
|
+
interface Location {
|
|
1481
|
+
/**
|
|
1482
|
+
* Returns the Location object's URL's fragment (includes leading "#" if non-empty).
|
|
1483
|
+
*
|
|
1484
|
+
* Can be set, to navigate to the same URL with a changed fragment (ignores leading "#").
|
|
1485
|
+
*/
|
|
1486
|
+
hash: string;
|
|
1487
|
+
/**
|
|
1488
|
+
* Returns the Location object's URL's host and port (if different from the default port for the scheme).
|
|
1489
|
+
*
|
|
1490
|
+
* Can be set, to navigate to the same URL with a changed host and port.
|
|
1491
|
+
*/
|
|
1492
|
+
host: string;
|
|
1493
|
+
/**
|
|
1494
|
+
* Returns the Location object's URL's host name.
|
|
1495
|
+
*
|
|
1496
|
+
* Can be set, to navigate to the same URL with a changed host name.
|
|
1497
|
+
*/
|
|
1498
|
+
hostname: string;
|
|
1499
|
+
/**
|
|
1500
|
+
* Returns the Location object's URL.
|
|
1501
|
+
*
|
|
1502
|
+
* Can be set, to navigate to the given URL.
|
|
1503
|
+
*/
|
|
1504
|
+
href: string;
|
|
1505
|
+
/**
|
|
1506
|
+
* Returns the Location object's URL's path.
|
|
1507
|
+
*
|
|
1508
|
+
* Can be set, to navigate to the same URL with a changed path.
|
|
1509
|
+
*/
|
|
1510
|
+
pathname: string;
|
|
1511
|
+
/**
|
|
1512
|
+
* Returns the Location object's URL's port.
|
|
1513
|
+
*
|
|
1514
|
+
* Can be set, to navigate to the same URL with a changed port.
|
|
1515
|
+
*/
|
|
1516
|
+
port: string;
|
|
1517
|
+
/**
|
|
1518
|
+
* Returns the Location object's URL's scheme.
|
|
1519
|
+
*
|
|
1520
|
+
* Can be set, to navigate to the same URL with a changed scheme.
|
|
1521
|
+
*/
|
|
1522
|
+
protocol: string;
|
|
1523
|
+
/**
|
|
1524
|
+
* Returns the Location object's URL's query (includes leading "?" if non-empty).
|
|
1525
|
+
*
|
|
1526
|
+
* Can be set, to navigate to the same URL with a changed query (ignores leading "?").
|
|
1527
|
+
*/
|
|
1528
|
+
search: string;
|
|
1529
|
+
|
|
1530
|
+
/**
|
|
1531
|
+
* Navigates to the given URL.
|
|
1532
|
+
*/
|
|
1533
|
+
assign(url: string): void;
|
|
1534
|
+
|
|
1535
|
+
/**
|
|
1536
|
+
* Reloads the current page.
|
|
1537
|
+
*/
|
|
1538
|
+
reload(): void;
|
|
1539
|
+
|
|
1540
|
+
/**
|
|
1541
|
+
* Removes the current page from the session history and navigates to the given URL.
|
|
1542
|
+
*/
|
|
1543
|
+
replace(url: string): void;
|
|
1544
|
+
|
|
1545
|
+
back(): void;
|
|
1546
|
+
|
|
1547
|
+
forward(): void;
|
|
1548
|
+
|
|
1549
|
+
go(step: number): void;
|
|
1550
|
+
|
|
1551
|
+
pushState(state: any, title: string, url: string): void;
|
|
1552
|
+
|
|
1553
|
+
now(): any;
|
|
1554
|
+
}
|
|
1555
|
+
|
|
1556
|
+
/*pix
|
|
1557
|
+
gen: binding
|
|
1558
|
+
cpp-class: H5DebugConsole
|
|
1559
|
+
end-def: WithName
|
|
1560
|
+
*/
|
|
1561
|
+
interface Console {
|
|
1562
|
+
enableTrace(b: boolean): void;
|
|
1563
|
+
|
|
1564
|
+
info(msg: string, ...arguments: any[]): number;
|
|
1565
|
+
debug(msg: string, ...arguments: any[]): number;
|
|
1566
|
+
|
|
1567
|
+
log(msg: string, ...arguments: any[]): number;
|
|
1568
|
+
|
|
1569
|
+
warn(msg: string, ...arguments: any[]): number;
|
|
1570
|
+
|
|
1571
|
+
error(msg: string, ...arguments: any[]): number;
|
|
1572
|
+
|
|
1573
|
+
assert(msg: string, ...arguments: any[]): number;
|
|
1574
|
+
}
|
|
1575
|
+
|
|
1576
|
+
interface WindowEventHandlers {
|
|
1577
|
+
// onDOMContentLoaded只能用addEventListener添加
|
|
1578
|
+
// onDOMContentLoaded: ((this: WindowEventHandlers, ev: Event) => any) | null;
|
|
1579
|
+
|
|
1580
|
+
onload: ((this: WindowEventHandlers, ev: Event) => any) | null;
|
|
1581
|
+
onunload: ((this: WindowEventHandlers, ev: Event) => any) | null;
|
|
1582
|
+
onbeforeunload: ((this: WindowEventHandlers, ev: Event) => any) | null;
|
|
1583
|
+
onclose: ((this: WindowEventHandlers, ev: CloseEvent) => any) | null;
|
|
1584
|
+
onclick: ((this: WindowEventHandlers, ev: MouseClickEvent) => any) | null;
|
|
1585
|
+
onmessage: ((this: WindowEventHandlers, ev: MessageEvent) => any) | null;
|
|
1586
|
+
// onpopstate: ((this: WindowEventHandlers, ev: PopStateEvent) => any) | null;
|
|
1587
|
+
onerror: ((this: WindowEventHandlers, ev: ErrorEvent) => any) | null;
|
|
1588
|
+
onresize: ((this: WindowEventHandlers, ev: Event) => any) | null;
|
|
1589
|
+
onscreenresize: ((this: WindowEventHandlers, ev: Event) => any) | null;
|
|
1590
|
+
}
|
|
1591
|
+
|
|
1592
|
+
interface WindowEventHandlersEventMap {
|
|
1593
|
+
DOMContentLoaded: Event;
|
|
1594
|
+
load: Event;
|
|
1595
|
+
unload: Event;
|
|
1596
|
+
beforeunload: Event;
|
|
1597
|
+
close: CloseEvent;
|
|
1598
|
+
click: Event;
|
|
1599
|
+
message: MessageEvent;
|
|
1600
|
+
error: ErrorEvent;
|
|
1601
|
+
resize: Event;
|
|
1602
|
+
screenresize: Event;
|
|
1603
|
+
}
|
|
1604
|
+
|
|
1605
|
+
interface AudioEventHandlers extends EventHandlers {
|
|
1606
|
+
onplay: ((this: AudioEventHandlers, ev: Event) => any) | null;
|
|
1607
|
+
onplaying: ((this: AudioEventHandlers, ev: Event) => any) | null;
|
|
1608
|
+
onended: ((this: AudioEventHandlers, ev: Event) => any) | null;
|
|
1609
|
+
onpause: ((this: AudioEventHandlers, ev: Event) => any) | null;
|
|
1610
|
+
onseeking: ((this: AudioEventHandlers, ev: Event) => any) | null;
|
|
1611
|
+
onseeked: ((this: AudioEventHandlers, ev: Event) => any) | null;
|
|
1612
|
+
onerror: ((this: AudioEventHandlers, ev: ErrorEvent) => any) | null;
|
|
1613
|
+
onwaiting: ((this: AudioEventHandlers, ev: ErrorEvent) => any) | null;
|
|
1614
|
+
oncanplay: ((this: AudioEventHandlers, ev: ErrorEvent) => any) | null;
|
|
1615
|
+
onloadstart: ((this: AudioEventHandlers, ev: ErrorEvent) => any) | null;
|
|
1616
|
+
onloadeddata: ((this: AudioEventHandlers, ev: ErrorEvent) => any) | null;
|
|
1617
|
+
onfirstframe: ((this: AudioEventHandlers, ev: ErrorEvent) => any) | null;
|
|
1618
|
+
}
|
|
1619
|
+
|
|
1620
|
+
interface AudioEventHandlersEventMap extends EventHandlersEventMap {
|
|
1621
|
+
seeking: Event;
|
|
1622
|
+
pause: Event;
|
|
1623
|
+
play: Event;
|
|
1624
|
+
playing: Event;
|
|
1625
|
+
ended: Event;
|
|
1626
|
+
seeked: Event;
|
|
1627
|
+
}
|
|
1628
|
+
|
|
1629
|
+
interface VideoEventHandlers extends EventHandlers {
|
|
1630
|
+
onplay: ((this: VideoEventHandlers, ev: Event) => any) | null;
|
|
1631
|
+
onplaying: ((this: VideoEventHandlers, ev: Event) => any) | null;
|
|
1632
|
+
onended: ((this: VideoEventHandlers, ev: Event) => any) | null;
|
|
1633
|
+
onpause: ((this: VideoEventHandlers, ev: Event) => any) | null;
|
|
1634
|
+
onseeking: ((this: VideoEventHandlers, ev: Event) => any) | null;
|
|
1635
|
+
onseeked: ((this: VideoEventHandlers, ev: Event) => any) | null;
|
|
1636
|
+
onerror: ((this: VideoEventHandlers, ev: ErrorEvent) => any) | null;
|
|
1637
|
+
onwaiting: ((this: AudioEventHandlers, ev: ErrorEvent) => any) | null;
|
|
1638
|
+
oncanplay: ((this: AudioEventHandlers, ev: ErrorEvent) => any) | null;
|
|
1639
|
+
onloadstart: ((this: AudioEventHandlers, ev: ErrorEvent) => any) | null;
|
|
1640
|
+
onloadeddata: ((this: AudioEventHandlers, ev: ErrorEvent) => any) | null;
|
|
1641
|
+
onfirstframe: ((this: AudioEventHandlers, ev: ErrorEvent) => any) | null;
|
|
1642
|
+
}
|
|
1643
|
+
|
|
1644
|
+
interface VideoEventHandlersEventMap extends EventHandlersEventMap {
|
|
1645
|
+
seeking: Event;
|
|
1646
|
+
pause: Event;
|
|
1647
|
+
play: Event;
|
|
1648
|
+
playing: Event;
|
|
1649
|
+
ended: Event;
|
|
1650
|
+
seeked: Event;
|
|
1651
|
+
}
|
|
1652
|
+
|
|
1653
|
+
interface LottieEventHandlers extends EventHandlers {
|
|
1654
|
+
oncomplete: ((this: LottieEventHandlers, ev: Event) => any) | null;
|
|
1655
|
+
onenterframe: ((this: LottieEventHandlers, ev: LottieEvent) => any) | null;
|
|
1656
|
+
}
|
|
1657
|
+
|
|
1658
|
+
interface LottieEventHandlersEventMap extends EventHandlersEventMap {
|
|
1659
|
+
complete: Event;
|
|
1660
|
+
enterframe: LottieEvent;
|
|
1661
|
+
}
|
|
1662
|
+
|
|
1663
|
+
interface InputEventHandlers extends EventHandlers {
|
|
1664
|
+
onchange: ((this: InputEventHandlers, ev: Event) => any) | null;
|
|
1665
|
+
oninput: ((this: InputEventHandlers, ev: Event) => any) | null;
|
|
1666
|
+
}
|
|
1667
|
+
|
|
1668
|
+
interface InputEventHandlersEventMap extends EventHandlersEventMap {
|
|
1669
|
+
change: Event;
|
|
1670
|
+
input: Event;
|
|
1671
|
+
}
|
|
1672
|
+
|
|
1673
|
+
interface ScriptExternalEventHandlers {
|
|
1674
|
+
onmessage: ((this: ScriptExternalEventHandlers, ev: MessageEvent) => any) | null;
|
|
1675
|
+
}
|
|
1676
|
+
|
|
1677
|
+
interface ScriptExternalEventHandlersEventMap {
|
|
1678
|
+
message: MessageEvent;
|
|
1679
|
+
}
|
|
1680
|
+
|
|
1681
|
+
interface CefEventHandlers extends EventHandlers {
|
|
1682
|
+
onjsresult: ((this: CefEventHandlers, ev: CefExecJSEvent) => any) | null;
|
|
1683
|
+
}
|
|
1684
|
+
|
|
1685
|
+
interface CefEventHandlersEventMap extends EventHandlersEventMap {
|
|
1686
|
+
jsresult: CefExecJSEvent;
|
|
1687
|
+
}
|
|
1688
|
+
|
|
1689
|
+
/*pix
|
|
1690
|
+
gen: binding
|
|
1691
|
+
cpp-class: H5Screen
|
|
1692
|
+
*/
|
|
1693
|
+
interface Screen {
|
|
1694
|
+
readonly height: number;
|
|
1695
|
+
readonly width: number;
|
|
1696
|
+
}
|
|
1697
|
+
|
|
1698
|
+
/*pix
|
|
1699
|
+
gen: binding
|
|
1700
|
+
cpp-class: H5Window
|
|
1701
|
+
with-handlers: WindowEventHandlers
|
|
1702
|
+
*/
|
|
1703
|
+
interface Window extends EventTarget, WindowEventHandlers {
|
|
1704
|
+
readonly innerHeight: number;
|
|
1705
|
+
readonly innerWidth: number;
|
|
1706
|
+
// readonly document: Document;
|
|
1707
|
+
id: number;
|
|
1708
|
+
location: Location;
|
|
1709
|
+
localStorage: Storage;
|
|
1710
|
+
history: Location;
|
|
1711
|
+
opener: number;
|
|
1712
|
+
readonly scrollX: number;
|
|
1713
|
+
readonly scrollY: number;
|
|
1714
|
+
readonly screen: Screen;
|
|
1715
|
+
httpVersion: number;
|
|
1716
|
+
netEncodingMode: string;
|
|
1717
|
+
netThreadMode: string;
|
|
1718
|
+
netTimeout: number;
|
|
1719
|
+
targetApi: number;
|
|
1722
1720
|
|
|
1723
|
-
|
|
1721
|
+
open(url?: string, target?: string, features?: string, replace?: boolean): number;
|
|
1724
1722
|
|
|
1725
|
-
|
|
1723
|
+
postMessage(message: any, id?: number | null): void;
|
|
1726
1724
|
|
|
1727
|
-
|
|
1725
|
+
close(): void;
|
|
1728
1726
|
|
|
1729
|
-
|
|
1727
|
+
blur(): void;
|
|
1730
1728
|
|
|
1731
|
-
|
|
1729
|
+
focus(): void;
|
|
1732
1730
|
|
|
1733
|
-
|
|
1731
|
+
getComputedStyle(elt: HTMLElement, pseudoElt?: string | null): CSSStyleDeclaration;
|
|
1734
1732
|
|
|
1735
|
-
|
|
1733
|
+
cancelAnimationFrame(handle: number): void;
|
|
1736
1734
|
|
|
1737
|
-
|
|
1735
|
+
requestAnimationFrame(callback: FrameRequestCallback): number;
|
|
1738
1736
|
|
|
1739
|
-
|
|
1737
|
+
clearInterval(handle?: number): void;
|
|
1740
1738
|
|
|
1741
|
-
|
|
1739
|
+
clearTimeout(handle?: number): void;
|
|
1742
1740
|
|
|
1743
|
-
|
|
1741
|
+
setInterval(handler: Function, timeout?: number, ...arguments: any[]): number;
|
|
1744
1742
|
|
|
1745
|
-
|
|
1743
|
+
setTimeout(handler: Function, timeout?: number, ...arguments: any[]): number;
|
|
1746
1744
|
|
|
1747
|
-
|
|
1745
|
+
moveBy(x: number, y: number): void;
|
|
1748
1746
|
|
|
1749
|
-
|
|
1747
|
+
moveTo(x: number, y: number): void;
|
|
1750
1748
|
|
|
1751
|
-
|
|
1749
|
+
resizeBy(x: number, y: number): void;
|
|
1752
1750
|
|
|
1753
|
-
|
|
1751
|
+
resizeTo(width: number, height: number): void;
|
|
1754
1752
|
|
|
1755
|
-
|
|
1753
|
+
scrollBy(x: number, y: number): void;
|
|
1756
1754
|
|
|
1757
|
-
|
|
1755
|
+
scrollTo(x: number, y: number): void;
|
|
1758
1756
|
|
|
1759
|
-
|
|
1757
|
+
atob(strToDecode: string): string;
|
|
1760
1758
|
|
|
1761
|
-
|
|
1762
|
-
}
|
|
1759
|
+
btoa(strToEncode: string): string;
|
|
1763
1760
|
|
|
1764
|
-
|
|
1765
|
-
gen: binding
|
|
1766
|
-
cpp-class: H5Storage
|
|
1767
|
-
*/
|
|
1768
|
-
interface Storage {
|
|
1769
|
-
key(index: number): string;
|
|
1770
|
-
getItem(keyName: string): string;
|
|
1771
|
-
setItem(keyName: string, value: string): void;
|
|
1772
|
-
removeItem(keyName: string): void;
|
|
1773
|
-
clear(): void;
|
|
1774
|
-
length: number;
|
|
1775
|
-
}
|
|
1761
|
+
addEventListener<K extends keyof WindowEventHandlersEventMap>(type: K, listener: (this: Window, ev: WindowEventHandlersEventMap[K]) => any): void;
|
|
1776
1762
|
|
|
1777
|
-
|
|
1778
|
-
gen: binding
|
|
1779
|
-
cpp-class: H5CSSStyleRule
|
|
1780
|
-
*/
|
|
1781
|
-
interface CSSRule {
|
|
1782
|
-
readonly cssText: string;
|
|
1783
|
-
readonly selectorText: string;
|
|
1784
|
-
}
|
|
1763
|
+
removeEventListener<K extends keyof WindowEventHandlersEventMap>(type: K, listener: (this: Window, ev: WindowEventHandlersEventMap[K]) => any): void;
|
|
1785
1764
|
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
cpp-class: H5CSSStyleSheet
|
|
1789
|
-
*/
|
|
1790
|
-
interface CSSStyleSheet {
|
|
1791
|
-
cssRules: CSSRule[];
|
|
1792
|
-
}
|
|
1765
|
+
setNetReferer(referer: string): void;
|
|
1766
|
+
}
|
|
1793
1767
|
|
|
1794
|
-
/*pix
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
interface
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1768
|
+
/*pix
|
|
1769
|
+
gen: binding
|
|
1770
|
+
cpp-class: H5Storage
|
|
1771
|
+
*/
|
|
1772
|
+
interface Storage {
|
|
1773
|
+
key(index: number): string;
|
|
1774
|
+
getItem(keyName: string): string;
|
|
1775
|
+
setItem(keyName: string, value: string): void;
|
|
1776
|
+
removeItem(keyName: string): void;
|
|
1777
|
+
clear(): void;
|
|
1778
|
+
length: number;
|
|
1779
|
+
}
|
|
1780
|
+
|
|
1781
|
+
/*pix
|
|
1782
|
+
gen: binding
|
|
1783
|
+
cpp-class: H5CSSStyleRule
|
|
1784
|
+
*/
|
|
1785
|
+
interface CSSRule {
|
|
1786
|
+
readonly cssText: string;
|
|
1787
|
+
readonly selectorText: string;
|
|
1788
|
+
}
|
|
1789
|
+
|
|
1790
|
+
/*pix
|
|
1791
|
+
gen: binding
|
|
1792
|
+
cpp-class: H5CSSStyleSheet
|
|
1793
|
+
*/
|
|
1794
|
+
interface CSSStyleSheet {
|
|
1795
|
+
cssRules: CSSRule[];
|
|
1796
|
+
}
|
|
1805
1797
|
|
|
1806
|
-
|
|
1807
|
-
|
|
1798
|
+
/*pix
|
|
1799
|
+
gen: binding
|
|
1800
|
+
cpp-class: H5WindowProxy
|
|
1801
|
+
*/
|
|
1802
|
+
interface WindowProxy {
|
|
1803
|
+
isValid(): boolean;
|
|
1804
|
+
close(): void;
|
|
1805
|
+
postMessage(message: string): void;
|
|
1806
|
+
resizeTo(width: number, height: number): void;
|
|
1807
|
+
moveTo(x: number, y: number): void;
|
|
1808
|
+
}
|
|
1809
|
+
|
|
1810
|
+
interface Navigator {
|
|
1811
|
+
readonly userAgent: string;
|
|
1812
|
+
}
|
|
1813
|
+
|
|
1814
|
+
interface ResizeObserver {
|
|
1815
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ResizeObserver/disconnect) */
|
|
1816
|
+
disconnect(): void;
|
|
1817
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ResizeObserver/observe) */
|
|
1818
|
+
observe(target: Element, options?: ResizeObserverOptions): void;
|
|
1819
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ResizeObserver/unobserve) */
|
|
1820
|
+
unobserve(target: Element): void;
|
|
1821
|
+
}
|
|
1822
|
+
|
|
1823
|
+
declare var document: Document;
|
|
1824
|
+
declare var window: Window;
|
|
1825
|
+
declare var console: console;
|
|
1826
|
+
|
|
1827
|
+
declare function clearInterval(id: number | undefined): void;
|
|
1828
|
+
declare function clearTimeout(id: number | undefined): void;
|
|
1829
|
+
declare function setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
|
|
1830
|
+
declare function setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
|
|
1831
|
+
// declare function fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
|
|
1832
|
+
|
|
1833
|
+
declare var event: Event | undefined;
|
|
1834
|
+
declare var external: External;
|
|
1835
|
+
declare var location: Location;
|
|
1836
|
+
declare var navigator: Navigator;
|
|
1837
|
+
declare var ResizeObserver: {
|
|
1838
|
+
prototype: ResizeObserver;
|
|
1839
|
+
new (callback: ResizeObserverCallback): ResizeObserver;
|
|
1840
|
+
};
|
|
1841
|
+
}
|
|
1842
|
+
|
|
1843
|
+
declare module 'preact' {
|
|
1844
|
+
namespace JSX {
|
|
1845
|
+
interface IntrinsicElements {
|
|
1846
|
+
cef: HTMLAttributes<HTMLCefElement>;
|
|
1847
|
+
}
|
|
1848
|
+
}
|
|
1808
1849
|
}
|
|
1809
1850
|
|
|
1810
|
-
declare var document: Document;
|
|
1811
|
-
declare var window: Window;
|
|
1812
|
-
declare var console: console;
|
|
1813
|
-
|
|
1814
|
-
declare function clearInterval(id: number | undefined): void;
|
|
1815
|
-
declare function clearTimeout(id: number | undefined): void;
|
|
1816
|
-
declare function setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
|
|
1817
|
-
declare function setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
|
|
1818
|
-
// declare function fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
|
|
1819
|
-
|
|
1820
|
-
declare var event: Event | undefined;
|
|
1821
|
-
declare var external: External;
|
|
1822
|
-
declare var location: Location;
|
|
1823
|
-
declare var navigator: Navigator;
|
|
1824
|
-
|
|
1825
|
-
interface ResizeObserver {
|
|
1826
|
-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ResizeObserver/disconnect) */
|
|
1827
|
-
disconnect(): void;
|
|
1828
|
-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ResizeObserver/observe) */
|
|
1829
|
-
observe(target: Element, options?: ResizeObserverOptions): void;
|
|
1830
|
-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ResizeObserver/unobserve) */
|
|
1831
|
-
unobserve(target: Element): void;
|
|
1832
|
-
}
|
|
1833
1851
|
|
|
1834
|
-
declare var ResizeObserver: {
|
|
1835
|
-
prototype: ResizeObserver;
|
|
1836
|
-
new (callback: ResizeObserverCallback): ResizeObserver;
|
|
1837
|
-
};
|