cotomy 0.1.58 → 0.1.60
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/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/view.d.ts +10 -3
- package/package.json +1 -1
package/dist/view.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
interface IEventTarget {
|
|
2
|
+
get scopeId(): string;
|
|
3
|
+
element: HTMLElement;
|
|
4
|
+
}
|
|
5
|
+
export declare class CotomyElement implements IEventTarget {
|
|
2
6
|
static encodeHtml(text: string): string;
|
|
3
7
|
private static createHTMLElement;
|
|
4
8
|
static first<T extends CotomyElement = CotomyElement>(selector: string, type?: new (el: HTMLElement) => T): T | undefined;
|
|
@@ -9,7 +13,6 @@ export declare class CotomyElement {
|
|
|
9
13
|
static empty<T extends CotomyElement = CotomyElement>(type?: new (el: HTMLElement) => T): T;
|
|
10
14
|
private _element;
|
|
11
15
|
private _parentElement;
|
|
12
|
-
private _eventHandlers;
|
|
13
16
|
constructor(element: HTMLElement | {
|
|
14
17
|
html: string;
|
|
15
18
|
css?: string;
|
|
@@ -140,11 +143,14 @@ export declare class CotomyElement {
|
|
|
140
143
|
trigger(event: string): this;
|
|
141
144
|
trigger(event: string, e: Event): this;
|
|
142
145
|
on(event: string, handle: (e: Event) => void | Promise<void>): this;
|
|
146
|
+
on(event: string, handle: (e: Event) => void | Promise<void>, options: AddEventListenerOptions): this;
|
|
143
147
|
onChild(event: string, selector: string, handle: (e: Event) => void | Promise<void>): this;
|
|
148
|
+
onChild(event: string, selector: string, handle: (e: Event) => void | Promise<void>, options: AddEventListenerOptions): this;
|
|
144
149
|
once(event: string, handle: (e: Event) => void | Promise<void>): this;
|
|
150
|
+
once(event: string, handle: (e: Event) => void | Promise<void>, options: AddEventListenerOptions): this;
|
|
145
151
|
off(event: string): this;
|
|
146
152
|
off(event: string, handle: (e: Event) => void | Promise<void>): this;
|
|
147
|
-
|
|
153
|
+
off(event: string, handle: (e: Event) => void | Promise<void>, options: AddEventListenerOptions): this;
|
|
148
154
|
click(): this;
|
|
149
155
|
click(handle: (e: MouseEvent) => void | Promise<void>): this;
|
|
150
156
|
dblclick(): this;
|
|
@@ -249,3 +255,4 @@ export declare class CotomyWindow {
|
|
|
249
255
|
get documentWidth(): number;
|
|
250
256
|
get documentHeight(): number;
|
|
251
257
|
}
|
|
258
|
+
export {};
|