incajs 0.0.20 → 0.0.21
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/dist/callbacks.d.mts +2 -2
- package/dist/element/types.d.mts +3 -3
- package/dist/events.d.mts +4 -4
- package/dist/index.d.mts +1 -1
- package/dist/types.d.mts +187 -16
- package/dist/vue/patchProp.d.mts +2 -2
- package/package.json +1 -1
package/dist/callbacks.d.mts
CHANGED
|
@@ -7,13 +7,13 @@ import { CallbackId, EventListenerOrObject, NodeId } from './types.mts';
|
|
|
7
7
|
* @param callbackId - the id the host returned for the registration
|
|
8
8
|
* @param callable - the function the host runs
|
|
9
9
|
*/
|
|
10
|
-
export declare function addCallback(group: string, listener: EventListenerOrObject<never>, callbackId: CallbackId, callable: HostCallback): void;
|
|
10
|
+
export declare function addCallback(group: string, listener: EventListenerOrObject<never, never>, callbackId: CallbackId, callable: HostCallback): void;
|
|
11
11
|
/**
|
|
12
12
|
* @param group - the node, event and capture flag as one string
|
|
13
13
|
* @param listener - the listener the caller registered
|
|
14
14
|
* @returns the id registered for the pair, or `undefined`
|
|
15
15
|
*/
|
|
16
|
-
export declare function callbackIdFor(group: string, listener: EventListenerOrObject<never>): CallbackId | undefined;
|
|
16
|
+
export declare function callbackIdFor(group: string, listener: EventListenerOrObject<never, never>): CallbackId | undefined;
|
|
17
17
|
/**
|
|
18
18
|
* Forgets `callbackId` and the listener it names. An id that was never
|
|
19
19
|
* registered, or was released already, changes nothing.
|
package/dist/element/types.d.mts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { IncaEvent, IncaEventTarget } from '../types.mts';
|
|
1
|
+
import { IncaEvent, IncaEventMap, IncaEventTarget } from '../types.mts';
|
|
2
2
|
import { HANDLER_EVENTS } from './eventHandlers.mts';
|
|
3
3
|
import { RectLike } from './geometry.mts';
|
|
4
4
|
import { ScrollIntoViewOptions, ScrollOptions } from './scroll.mts';
|
|
5
5
|
/** A function an event handler property holds, called with the element as `this` and the event. */
|
|
6
|
-
export type EventHandler = (this: IncaElement, event:
|
|
6
|
+
export type EventHandler<E = IncaEvent> = (this: IncaElement, event: E) => unknown;
|
|
7
7
|
/**
|
|
8
8
|
* The event handler properties, such as `onclick`, of the events the host dispatches, `focusin` and
|
|
9
9
|
* `focusout` excepted.
|
|
10
10
|
*/
|
|
11
11
|
export type EventHandlers = {
|
|
12
|
-
[K in (typeof HANDLER_EVENTS)[number] as `on${K}`]: EventHandler | object | null;
|
|
12
|
+
[K in (typeof HANDLER_EVENTS)[number] as `on${K}`]: EventHandler<IncaEventMap[K]> | object | null;
|
|
13
13
|
};
|
|
14
14
|
/**
|
|
15
15
|
* A container node: either a real element or the hidden stand-in that
|
package/dist/events.d.mts
CHANGED
|
@@ -11,7 +11,7 @@ export declare function latestEventId(): number;
|
|
|
11
11
|
* registration keeps its other options. A `null` listener is ignored.
|
|
12
12
|
*
|
|
13
13
|
* Any event name is accepted, and it fires when the host dispatches that name.
|
|
14
|
-
*
|
|
14
|
+
* `IncaEventMap` gives the event type of each name the host dispatches.
|
|
15
15
|
* @param nodeId - the node to listen on
|
|
16
16
|
* @param event - the event name (e.g. `"click"`)
|
|
17
17
|
* @param listener - a function, called with the event's `currentTarget` as
|
|
@@ -24,7 +24,7 @@ export declare function latestEventId(): number;
|
|
|
24
24
|
* @throws TypeError when `nodeId` names no node
|
|
25
25
|
* @throws RangeError when the host has issued its last callback id
|
|
26
26
|
*/
|
|
27
|
-
export declare function addEventListener(nodeId: NodeId, event: string, listener: EventListenerOrObject<never> | null, options?: ListenerOptions): void;
|
|
27
|
+
export declare function addEventListener(nodeId: NodeId, event: string, listener: EventListenerOrObject<never, never> | null, options?: ListenerOptions): void;
|
|
28
28
|
/**
|
|
29
29
|
* Drops the registration {@link addEventListener} made for `listener` on
|
|
30
30
|
* `nodeId` with the same `event` and `capture`. A no-op if there is none.
|
|
@@ -33,7 +33,7 @@ export declare function addEventListener(nodeId: NodeId, event: string, listener
|
|
|
33
33
|
* @param listener - the listener that was registered
|
|
34
34
|
* @param options - `capture` of the registration to drop
|
|
35
35
|
*/
|
|
36
|
-
export declare function removeEventListener(nodeId: NodeId, event: string, listener: EventListenerOrObject<never> | null, options?: Pick<ListenerOptions, "capture">): void;
|
|
36
|
+
export declare function removeEventListener(nodeId: NodeId, event: string, listener: EventListenerOrObject<never, never> | null, options?: Pick<ListenerOptions, "capture">): void;
|
|
37
37
|
/**
|
|
38
38
|
* Dispatches `event` at `nodeId` along the path to the root.
|
|
39
39
|
* @param nodeId - the node to dispatch at
|
|
@@ -41,7 +41,7 @@ export declare function removeEventListener(nodeId: NodeId, event: string, liste
|
|
|
41
41
|
* @returns `false` when a listener canceled a cancelable event, else `true`
|
|
42
42
|
* @throws TypeError when `nodeId` is malformed
|
|
43
43
|
* @throws TypeError when `nodeId` names no node
|
|
44
|
-
* @throws TypeError when `event` is not an
|
|
44
|
+
* @throws TypeError when `event` is not an event built with an event constructor
|
|
45
45
|
* @throws DOMException named `InvalidStateError` when `event` is being dispatched
|
|
46
46
|
*/
|
|
47
47
|
export declare function dispatchEvent(nodeId: NodeId, event: EventLike): boolean;
|
package/dist/index.d.mts
CHANGED
|
@@ -3,4 +3,4 @@ export { window } from './window.mts';
|
|
|
3
3
|
export type { RectLike, RectValues } from './element/geometry.mts';
|
|
4
4
|
export type { ScrollIntoViewOptions, ScrollOptions } from './element/scroll.mts';
|
|
5
5
|
export type { IncaElement, IncaNode } from './element/types.mts';
|
|
6
|
-
export type { AttributeValue, CallbackId, EventLike, EventListener, EventListenerObject, EventListenerOrObject, IncaEvent, IncaEventTarget, ListenerOptions, NodeId, StyleProps, TagName, } from './types.mts';
|
|
6
|
+
export type { AttributeValue, CallbackId, EventLike, EventListener, EventListenerObject, EventListenerOrObject, IncaEvent, IncaEventMap, IncaEventTarget, IncaFocusEvent, IncaKeyboardEvent, IncaMouseEvent, IncaPointerEvent, IncaUIEvent, IncaWheelEvent, ListenerOptions, NodeId, StyleProps, TagName, } from './types.mts';
|
package/dist/types.d.mts
CHANGED
|
@@ -110,8 +110,8 @@ export interface StyleProps {
|
|
|
110
110
|
max_height?: number | "auto";
|
|
111
111
|
}
|
|
112
112
|
/**
|
|
113
|
-
* An
|
|
114
|
-
* `TypeError` for any other value.
|
|
113
|
+
* An event built in this runtime with `Event`, `CustomEvent` or another
|
|
114
|
+
* event constructor. The host throws a `TypeError` for any other value.
|
|
115
115
|
*/
|
|
116
116
|
export interface EventLike {
|
|
117
117
|
readonly type: string;
|
|
@@ -144,7 +144,8 @@ export interface IncaEventTarget {
|
|
|
144
144
|
* as `this` when the event fires
|
|
145
145
|
* @param options - a {@link ListenerOptions}, or a boolean for `capture`
|
|
146
146
|
*/
|
|
147
|
-
addEventListener<
|
|
147
|
+
addEventListener<K extends keyof IncaEventMap>(type: K, listener: EventListenerOrObject<IncaEventMap[K], this> | null, options?: boolean | ListenerOptions): void;
|
|
148
|
+
addEventListener<E = IncaEvent>(type: string, listener: EventListenerOrObject<E, this> | null, options?: boolean | ListenerOptions): void;
|
|
148
149
|
/**
|
|
149
150
|
* Drops the registration of `listener` for `type` with the same `capture`.
|
|
150
151
|
* A call that matches no registration changes nothing.
|
|
@@ -152,21 +153,21 @@ export interface IncaEventTarget {
|
|
|
152
153
|
* @param listener - the listener that was registered
|
|
153
154
|
* @param options - an object with `capture`, or a boolean for `capture`
|
|
154
155
|
*/
|
|
155
|
-
removeEventListener<
|
|
156
|
+
removeEventListener<K extends keyof IncaEventMap>(type: K, listener: EventListenerOrObject<IncaEventMap[K], this> | null, options?: boolean | Pick<ListenerOptions, "capture">): void;
|
|
157
|
+
removeEventListener<E = IncaEvent>(type: string, listener: EventListenerOrObject<E, this> | null, options?: boolean | Pick<ListenerOptions, "capture">): void;
|
|
156
158
|
/**
|
|
157
|
-
* Dispatches an
|
|
159
|
+
* Dispatches an event built with an event constructor at the target.
|
|
158
160
|
* @param event - the event to dispatch
|
|
159
161
|
* @returns `false` when a listener canceled a cancelable event, else `true`
|
|
160
|
-
* @throws TypeError when `event` is not an
|
|
162
|
+
* @throws TypeError when `event` is not an event built with an event constructor
|
|
161
163
|
* @throws DOMException named `InvalidStateError` when `event` is being dispatched
|
|
162
164
|
*/
|
|
163
165
|
dispatchEvent(event: EventLike): boolean;
|
|
164
166
|
}
|
|
165
167
|
/**
|
|
166
|
-
* The
|
|
167
|
-
*
|
|
168
|
-
*
|
|
169
|
-
* `(event: IncaEvent & { key: string }) => void`.
|
|
168
|
+
* The fields every event carries. {@link IncaEventMap} gives the event type of
|
|
169
|
+
* each name the host dispatches, and a listener for any other name receives
|
|
170
|
+
* this type.
|
|
170
171
|
*
|
|
171
172
|
* See https://incajs.tom96da.com/reference/events for the event names the
|
|
172
173
|
* host dispatches and their fields.
|
|
@@ -174,6 +175,14 @@ export interface IncaEventTarget {
|
|
|
174
175
|
export interface IncaEvent {
|
|
175
176
|
/** The event's name. */
|
|
176
177
|
readonly type: string;
|
|
178
|
+
/** `0`, the {@link IncaEvent.eventPhase} outside a dispatch. */
|
|
179
|
+
readonly NONE: 0;
|
|
180
|
+
/** `1`, the {@link IncaEvent.eventPhase} on an ancestor while the event travels down. */
|
|
181
|
+
readonly CAPTURING_PHASE: 1;
|
|
182
|
+
/** `2`, the {@link IncaEvent.eventPhase} on the target. */
|
|
183
|
+
readonly AT_TARGET: 2;
|
|
184
|
+
/** `3`, the {@link IncaEvent.eventPhase} on an ancestor while the event travels up. */
|
|
185
|
+
readonly BUBBLING_PHASE: 3;
|
|
177
186
|
/**
|
|
178
187
|
* The element the event is about, or `window`. It is the deepest element
|
|
179
188
|
* under the pointer for pointer events, the nearest common ancestor of the
|
|
@@ -188,11 +197,17 @@ export interface IncaEvent {
|
|
|
188
197
|
* event has been handled. A listener function runs with it as `this`.
|
|
189
198
|
*/
|
|
190
199
|
readonly currentTarget: IncaEventTarget | null;
|
|
191
|
-
/**
|
|
200
|
+
/**
|
|
201
|
+
* Whether the event travels up from `target`. Fixed per event name for the
|
|
202
|
+
* events the host dispatches.
|
|
203
|
+
*/
|
|
192
204
|
readonly bubbles: boolean;
|
|
193
|
-
/**
|
|
205
|
+
/**
|
|
206
|
+
* Whether `preventDefault()` can cancel the event. Fixed per event name for
|
|
207
|
+
* the events the host dispatches.
|
|
208
|
+
*/
|
|
194
209
|
readonly cancelable: boolean;
|
|
195
|
-
/** Fixed per event name. */
|
|
210
|
+
/** Fixed per event name for the events the host dispatches. */
|
|
196
211
|
readonly composed: boolean;
|
|
197
212
|
/**
|
|
198
213
|
* 1 on the ancestors of `target` while the event travels down, 2 where
|
|
@@ -223,13 +238,169 @@ export interface IncaEvent {
|
|
|
223
238
|
* the event has been handled.
|
|
224
239
|
*/
|
|
225
240
|
composedPath(): IncaEventTarget[];
|
|
241
|
+
/**
|
|
242
|
+
* Sets the type, `bubbles` and `cancelable` of an event that is not being
|
|
243
|
+
* dispatched, clears its stop and cancel flags and makes it untrusted. While
|
|
244
|
+
* the event is dispatched it does nothing.
|
|
245
|
+
*/
|
|
246
|
+
initEvent(type: string, bubbles?: boolean, cancelable?: boolean): void;
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* The event object of a mouse, wheel, keyboard or focus event.
|
|
250
|
+
*/
|
|
251
|
+
export interface IncaUIEvent extends IncaEvent {
|
|
252
|
+
/**
|
|
253
|
+
* On the events the host dispatches, the click count of `mousedown`,
|
|
254
|
+
* `mouseup`, `click`, `dblclick` and `auxclick`, and `0` on the others.
|
|
255
|
+
*/
|
|
256
|
+
readonly detail: number;
|
|
257
|
+
/** Always `null`. */
|
|
258
|
+
readonly view: null;
|
|
259
|
+
/**
|
|
260
|
+
* On the events the host dispatches: for `mousedown`, `mouseup`, `click`,
|
|
261
|
+
* `dblclick`, `auxclick` and `contextmenu`, `button + 1`. For `wheel`, `0`.
|
|
262
|
+
* For the other mouse events, the lowest held button plus 1, or `0` with no
|
|
263
|
+
* button held. For a keyboard event, `keyCode`. For a focus event, `0`.
|
|
264
|
+
*/
|
|
265
|
+
readonly which: number;
|
|
266
|
+
}
|
|
267
|
+
/** The event object of `focus`, `blur`, `focusin` and `focusout`. */
|
|
268
|
+
export interface IncaFocusEvent extends IncaUIEvent {
|
|
269
|
+
/**
|
|
270
|
+
* The element gaining focus for `blur` and `focusout`, the element losing
|
|
271
|
+
* it for `focus` and `focusin`, or `null`.
|
|
272
|
+
*/
|
|
273
|
+
readonly relatedTarget: IncaEventTarget | null;
|
|
274
|
+
}
|
|
275
|
+
/** The event object of the mouse events. */
|
|
276
|
+
export interface IncaMouseEvent extends IncaUIEvent {
|
|
277
|
+
readonly screenX: number;
|
|
278
|
+
readonly screenY: number;
|
|
279
|
+
/** The pointer's position in the window. */
|
|
280
|
+
readonly clientX: number;
|
|
281
|
+
/** The pointer's position in the window. */
|
|
282
|
+
readonly clientY: number;
|
|
283
|
+
/** The same as {@link IncaMouseEvent.clientX}. */
|
|
284
|
+
readonly pageX: number;
|
|
285
|
+
/** The same as {@link IncaMouseEvent.clientY}. */
|
|
286
|
+
readonly pageY: number;
|
|
287
|
+
/** The same as {@link IncaMouseEvent.clientX}. */
|
|
288
|
+
readonly x: number;
|
|
289
|
+
/** The same as {@link IncaMouseEvent.clientY}. */
|
|
290
|
+
readonly y: number;
|
|
291
|
+
/** On the events the host dispatches, the pointer's position from the padding edge of `target`. */
|
|
292
|
+
readonly offsetX: number;
|
|
293
|
+
/** On the events the host dispatches, the pointer's position from the padding edge of `target`. */
|
|
294
|
+
readonly offsetY: number;
|
|
295
|
+
/** On the events the host dispatches, the pointer's travel since the previous `mousemove`, and `0` on other events. */
|
|
296
|
+
readonly movementX: number;
|
|
297
|
+
/** On the events the host dispatches, the pointer's travel since the previous `mousemove`, and `0` on other events. */
|
|
298
|
+
readonly movementY: number;
|
|
299
|
+
/** The button the event is about: `0` left, `1` middle, `2` right, `3` back, `4` forward. */
|
|
300
|
+
readonly button: number;
|
|
301
|
+
/** Every button held, as a bitmask: `1` left, `2` right, `4` middle, `8` back, `16` forward. */
|
|
302
|
+
readonly buttons: number;
|
|
303
|
+
readonly ctrlKey: boolean;
|
|
304
|
+
readonly shiftKey: boolean;
|
|
305
|
+
readonly altKey: boolean;
|
|
306
|
+
readonly metaKey: boolean;
|
|
307
|
+
/**
|
|
308
|
+
* The element the pointer came from for `mouseover` and `mouseenter`, the
|
|
309
|
+
* element it went to for `mouseout` and `mouseleave`, or `null`.
|
|
310
|
+
*/
|
|
311
|
+
readonly relatedTarget: IncaEventTarget | null;
|
|
312
|
+
/**
|
|
313
|
+
* Whether the modifier `key` is held: `"Control"`, `"Shift"`, `"Alt"`,
|
|
314
|
+
* `"Meta"`, or `"Accel"` (Meta on macOS, Control elsewhere). Any other name
|
|
315
|
+
* gives `false`.
|
|
316
|
+
*/
|
|
317
|
+
getModifierState(key: string): boolean;
|
|
318
|
+
}
|
|
319
|
+
/** The event object of `click`, `auxclick` and `contextmenu`. */
|
|
320
|
+
export interface IncaPointerEvent extends IncaMouseEvent {
|
|
321
|
+
/** On the events the host dispatches, `1` for the mouse and `-1` for the click of a key. */
|
|
322
|
+
readonly pointerId: number;
|
|
323
|
+
readonly width: number;
|
|
324
|
+
readonly height: number;
|
|
325
|
+
/** On the events the host dispatches, `0.5` while a button is held, else `0`. */
|
|
326
|
+
readonly pressure: number;
|
|
327
|
+
/** On the events the host dispatches, `"mouse"`, or `""` for the click of a key. */
|
|
328
|
+
readonly pointerType: string;
|
|
329
|
+
/** On the events the host dispatches, `true` for the mouse and `false` for the click of a key. */
|
|
330
|
+
readonly isPrimary: boolean;
|
|
331
|
+
}
|
|
332
|
+
/** The event object of `wheel`. */
|
|
333
|
+
export interface IncaWheelEvent extends IncaMouseEvent {
|
|
334
|
+
readonly deltaX: number;
|
|
335
|
+
readonly deltaY: number;
|
|
336
|
+
/** `0` on the events the host dispatches. */
|
|
337
|
+
readonly deltaZ: number;
|
|
338
|
+
/** `0` for pixels, `1` for lines. */
|
|
339
|
+
readonly deltaMode: number;
|
|
340
|
+
readonly DOM_DELTA_PIXEL: 0;
|
|
341
|
+
readonly DOM_DELTA_LINE: 1;
|
|
342
|
+
readonly DOM_DELTA_PAGE: 2;
|
|
343
|
+
}
|
|
344
|
+
/** The event object of `keydown` and `keyup`. */
|
|
345
|
+
export interface IncaKeyboardEvent extends IncaUIEvent {
|
|
346
|
+
/** The key's name, such as `"Enter"`, `"F5"` or the typed character. */
|
|
347
|
+
readonly key: string;
|
|
348
|
+
/** `""` on the events the host dispatches. */
|
|
349
|
+
readonly code: string;
|
|
350
|
+
/** `0` on the events the host dispatches. */
|
|
351
|
+
readonly location: number;
|
|
352
|
+
/** Whether the key press is an auto-repeat. */
|
|
353
|
+
readonly repeat: boolean;
|
|
354
|
+
/** `false` on the events the host dispatches. */
|
|
355
|
+
readonly isComposing: boolean;
|
|
356
|
+
/** The key's code on a US keyboard layout, and `0` for a key outside it. */
|
|
357
|
+
readonly keyCode: number;
|
|
358
|
+
/** `0` on the events the host dispatches. */
|
|
359
|
+
readonly charCode: number;
|
|
360
|
+
readonly ctrlKey: boolean;
|
|
361
|
+
readonly shiftKey: boolean;
|
|
362
|
+
readonly altKey: boolean;
|
|
363
|
+
readonly metaKey: boolean;
|
|
364
|
+
readonly DOM_KEY_LOCATION_STANDARD: 0;
|
|
365
|
+
readonly DOM_KEY_LOCATION_LEFT: 1;
|
|
366
|
+
readonly DOM_KEY_LOCATION_RIGHT: 2;
|
|
367
|
+
readonly DOM_KEY_LOCATION_NUMPAD: 3;
|
|
368
|
+
/**
|
|
369
|
+
* Whether the modifier `key` is held: `"Control"`, `"Shift"`, `"Alt"`,
|
|
370
|
+
* `"Meta"`, or `"Accel"` (Meta on macOS, Control elsewhere). Any other name
|
|
371
|
+
* gives `false`.
|
|
372
|
+
*/
|
|
373
|
+
getModifierState(key: string): boolean;
|
|
374
|
+
}
|
|
375
|
+
/** The event object of each event name the host dispatches. */
|
|
376
|
+
export interface IncaEventMap {
|
|
377
|
+
auxclick: IncaPointerEvent;
|
|
378
|
+
blur: IncaFocusEvent;
|
|
379
|
+
click: IncaPointerEvent;
|
|
380
|
+
contextmenu: IncaPointerEvent;
|
|
381
|
+
dblclick: IncaMouseEvent;
|
|
382
|
+
focus: IncaFocusEvent;
|
|
383
|
+
focusin: IncaFocusEvent;
|
|
384
|
+
focusout: IncaFocusEvent;
|
|
385
|
+
keydown: IncaKeyboardEvent;
|
|
386
|
+
keyup: IncaKeyboardEvent;
|
|
387
|
+
mousedown: IncaMouseEvent;
|
|
388
|
+
mouseenter: IncaMouseEvent;
|
|
389
|
+
mouseleave: IncaMouseEvent;
|
|
390
|
+
mousemove: IncaMouseEvent;
|
|
391
|
+
mouseout: IncaMouseEvent;
|
|
392
|
+
mouseover: IncaMouseEvent;
|
|
393
|
+
mouseup: IncaMouseEvent;
|
|
394
|
+
scroll: IncaEvent;
|
|
395
|
+
wheel: IncaWheelEvent;
|
|
226
396
|
}
|
|
227
397
|
/**
|
|
228
398
|
* Signature of a callback registered via `addEventListener`. It receives the
|
|
229
399
|
* event, an {@link IncaEvent} unless the parameter declares another type, and
|
|
230
|
-
* runs with the event's `currentTarget
|
|
400
|
+
* runs with the event's `currentTarget`, the target it was registered on, as
|
|
401
|
+
* `this`.
|
|
231
402
|
*/
|
|
232
|
-
export type EventListener<E = IncaEvent> = (this:
|
|
403
|
+
export type EventListener<E = IncaEvent, T = IncaEventTarget> = (this: T, event: E) => void;
|
|
233
404
|
/**
|
|
234
405
|
* An object whose `handleEvent` method receives the events, called with the
|
|
235
406
|
* object as `this`. It takes the event an {@link EventListener} takes.
|
|
@@ -241,4 +412,4 @@ export interface EventListenerObject<E = IncaEvent> {
|
|
|
241
412
|
* What `addEventListener` accepts as a listener: an {@link EventListener} or
|
|
242
413
|
* an {@link EventListenerObject}.
|
|
243
414
|
*/
|
|
244
|
-
export type EventListenerOrObject<E = IncaEvent> = EventListener<E> | EventListenerObject<E>;
|
|
415
|
+
export type EventListenerOrObject<E = IncaEvent, T = IncaEventTarget> = EventListener<E, T> | EventListenerObject<E>;
|
package/dist/vue/patchProp.d.mts
CHANGED
|
@@ -46,8 +46,8 @@ import { IncaCore, IncaElement } from '../rendererCore.mts';
|
|
|
46
46
|
* - Event names: `onXxx` listens for the hyphenated name (`onMyEvent` listens
|
|
47
47
|
* for `my-event`), and `on:xxx` listens for the name after the colon as
|
|
48
48
|
* written (`on:myEvent` listens for `myEvent`). The listener runs when the
|
|
49
|
-
* host dispatches that name.
|
|
50
|
-
*
|
|
49
|
+
* host dispatches that name. `IncaEventMap` gives the event type of each
|
|
50
|
+
* name the host dispatches.
|
|
51
51
|
* - Errors: an error a handler throws, or a rejection of an async handler,
|
|
52
52
|
* goes to the `onErrorCaptured` hooks and the app's `errorHandler`. Every
|
|
53
53
|
* handler of an event runs even when an earlier one fails, until one calls
|