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