tiny-essentials 1.22.3 → 1.22.5
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/v1/TinyAdvancedRaffle.min.js +1 -1
- package/dist/v1/TinyDragger.min.js +1 -1
- package/dist/v1/TinyEssentials.min.js +1 -1
- package/dist/v1/TinyEvents.min.js +1 -1
- package/dist/v1/TinyHtml.min.js +1 -1
- package/dist/v1/TinyIframeEvents.min.js +1 -1
- package/dist/v1/TinyLocalStorage.min.js +1 -1
- package/dist/v1/TinyNewWinEvents.min.js +1 -1
- package/dist/v1/TinySmartScroller.min.js +1 -1
- package/dist/v1/TinyUploadClicker.min.js +1 -1
- package/dist/v1/libs/TinyAdvancedRaffle.cjs +13 -13
- package/dist/v1/libs/TinyAdvancedRaffle.d.mts +19 -19
- package/dist/v1/libs/TinyAdvancedRaffle.mjs +13 -13
- package/dist/v1/libs/TinyEvents.cjs +98 -73
- package/dist/v1/libs/TinyEvents.d.mts +22 -22
- package/dist/v1/libs/TinyEvents.mjs +103 -77
- package/dist/v1/libs/TinyHtml.cjs +335 -17
- package/dist/v1/libs/TinyHtml.d.mts +209 -8
- package/dist/v1/libs/TinyHtml.mjs +320 -20
- package/dist/v1/libs/TinyIframeEvents.cjs +11 -11
- package/dist/v1/libs/TinyIframeEvents.d.mts +19 -19
- package/dist/v1/libs/TinyIframeEvents.mjs +11 -11
- package/dist/v1/libs/TinyLocalStorage.cjs +12 -12
- package/dist/v1/libs/TinyLocalStorage.d.mts +21 -21
- package/dist/v1/libs/TinyLocalStorage.mjs +12 -12
- package/dist/v1/libs/TinyNewWinEvents.cjs +11 -11
- package/dist/v1/libs/TinyNewWinEvents.d.mts +19 -19
- package/dist/v1/libs/TinyNewWinEvents.mjs +11 -11
- package/dist/v1/libs/TinySmartScroller.cjs +12 -12
- package/dist/v1/libs/TinySmartScroller.d.mts +53 -30
- package/dist/v1/libs/TinySmartScroller.mjs +12 -12
- package/docs/v1/libs/TinyEvents.md +93 -105
- package/docs/v1/libs/TinyHtml.md +39 -2
- package/package.json +1 -1
|
@@ -53,7 +53,7 @@ class TinyIframeEvents {
|
|
|
53
53
|
/**
|
|
54
54
|
* Adds a listener to the beginning of the listeners array for the specified event.
|
|
55
55
|
*
|
|
56
|
-
* @param {string} event - Event name.
|
|
56
|
+
* @param {string|string[]} event - Event name.
|
|
57
57
|
* @param {handler} handler - The callback function.
|
|
58
58
|
*/
|
|
59
59
|
prependListener(event, handler) {
|
|
@@ -63,9 +63,9 @@ class TinyIframeEvents {
|
|
|
63
63
|
/**
|
|
64
64
|
* Adds a one-time listener to the beginning of the listeners array for the specified event.
|
|
65
65
|
*
|
|
66
|
-
* @param {string} event - Event name.
|
|
66
|
+
* @param {string|string[]} event - Event name.
|
|
67
67
|
* @param {handler} handler - The callback function.
|
|
68
|
-
* @returns {handler} - The wrapped handler used internally.
|
|
68
|
+
* @returns {handler[]} - The wrapped handler used internally.
|
|
69
69
|
*/
|
|
70
70
|
prependListenerOnce(event, handler) {
|
|
71
71
|
return this.#events.prependListenerOnce(event, handler);
|
|
@@ -76,7 +76,7 @@ class TinyIframeEvents {
|
|
|
76
76
|
/**
|
|
77
77
|
* Adds a event listener.
|
|
78
78
|
*
|
|
79
|
-
* @param {string} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
79
|
+
* @param {string|string[]} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
80
80
|
* @param {handler} handler - Callback function to be called when event fires.
|
|
81
81
|
*/
|
|
82
82
|
appendListener(event, handler) {
|
|
@@ -86,9 +86,9 @@ class TinyIframeEvents {
|
|
|
86
86
|
/**
|
|
87
87
|
* Registers an event listener that runs only once, then is removed.
|
|
88
88
|
*
|
|
89
|
-
* @param {string} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
89
|
+
* @param {string|string[]} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
90
90
|
* @param {handler} handler - The callback function to run on event.
|
|
91
|
-
* @returns {handler} - The wrapped version of the handler.
|
|
91
|
+
* @returns {handler[]} - The wrapped version of the handler.
|
|
92
92
|
*/
|
|
93
93
|
appendListenerOnce(event, handler) {
|
|
94
94
|
return this.#events.appendListenerOnce(event, handler);
|
|
@@ -97,7 +97,7 @@ class TinyIframeEvents {
|
|
|
97
97
|
/**
|
|
98
98
|
* Adds a event listener.
|
|
99
99
|
*
|
|
100
|
-
* @param {string} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
100
|
+
* @param {string|string[]} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
101
101
|
* @param {handler} handler - Callback function to be called when event fires.
|
|
102
102
|
*/
|
|
103
103
|
on(event, handler) {
|
|
@@ -107,9 +107,9 @@ class TinyIframeEvents {
|
|
|
107
107
|
/**
|
|
108
108
|
* Registers an event listener that runs only once, then is removed.
|
|
109
109
|
*
|
|
110
|
-
* @param {string} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
110
|
+
* @param {string|string[]} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
111
111
|
* @param {handler} handler - The callback function to run on event.
|
|
112
|
-
* @returns {handler} - The wrapped version of the handler.
|
|
112
|
+
* @returns {handler[]} - The wrapped version of the handler.
|
|
113
113
|
*/
|
|
114
114
|
once(event, handler) {
|
|
115
115
|
return this.#events.once(event, handler);
|
|
@@ -120,7 +120,7 @@ class TinyIframeEvents {
|
|
|
120
120
|
/**
|
|
121
121
|
* Removes a previously registered event listener.
|
|
122
122
|
*
|
|
123
|
-
* @param {string} event - The name of the event to remove the handler from.
|
|
123
|
+
* @param {string|string[]} event - The name of the event to remove the handler from.
|
|
124
124
|
* @param {handler} handler - The specific callback function to remove.
|
|
125
125
|
*/
|
|
126
126
|
off(event, handler) {
|
|
@@ -130,7 +130,7 @@ class TinyIframeEvents {
|
|
|
130
130
|
/**
|
|
131
131
|
* Removes all event listeners of a specific type from the element.
|
|
132
132
|
*
|
|
133
|
-
* @param {string} event - The event type to remove (e.g. 'onScrollBoundary').
|
|
133
|
+
* @param {string|string[]} event - The event type to remove (e.g. 'onScrollBoundary').
|
|
134
134
|
*/
|
|
135
135
|
offAll(event) {
|
|
136
136
|
return this.#events.offAll(event);
|
|
@@ -51,61 +51,61 @@ declare class TinyIframeEvents {
|
|
|
51
51
|
/**
|
|
52
52
|
* Adds a listener to the beginning of the listeners array for the specified event.
|
|
53
53
|
*
|
|
54
|
-
* @param {string} event - Event name.
|
|
54
|
+
* @param {string|string[]} event - Event name.
|
|
55
55
|
* @param {handler} handler - The callback function.
|
|
56
56
|
*/
|
|
57
|
-
prependListener(event: string, handler: handler): void;
|
|
57
|
+
prependListener(event: string | string[], handler: handler): void;
|
|
58
58
|
/**
|
|
59
59
|
* Adds a one-time listener to the beginning of the listeners array for the specified event.
|
|
60
60
|
*
|
|
61
|
-
* @param {string} event - Event name.
|
|
61
|
+
* @param {string|string[]} event - Event name.
|
|
62
62
|
* @param {handler} handler - The callback function.
|
|
63
|
-
* @returns {handler} - The wrapped handler used internally.
|
|
63
|
+
* @returns {handler[]} - The wrapped handler used internally.
|
|
64
64
|
*/
|
|
65
|
-
prependListenerOnce(event: string, handler: handler): handler;
|
|
65
|
+
prependListenerOnce(event: string | string[], handler: handler): handler[];
|
|
66
66
|
/**
|
|
67
67
|
* Adds a event listener.
|
|
68
68
|
*
|
|
69
|
-
* @param {string} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
69
|
+
* @param {string|string[]} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
70
70
|
* @param {handler} handler - Callback function to be called when event fires.
|
|
71
71
|
*/
|
|
72
|
-
appendListener(event: string, handler: handler): void;
|
|
72
|
+
appendListener(event: string | string[], handler: handler): void;
|
|
73
73
|
/**
|
|
74
74
|
* Registers an event listener that runs only once, then is removed.
|
|
75
75
|
*
|
|
76
|
-
* @param {string} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
76
|
+
* @param {string|string[]} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
77
77
|
* @param {handler} handler - The callback function to run on event.
|
|
78
|
-
* @returns {handler} - The wrapped version of the handler.
|
|
78
|
+
* @returns {handler[]} - The wrapped version of the handler.
|
|
79
79
|
*/
|
|
80
|
-
appendListenerOnce(event: string, handler: handler): handler;
|
|
80
|
+
appendListenerOnce(event: string | string[], handler: handler): handler[];
|
|
81
81
|
/**
|
|
82
82
|
* Adds a event listener.
|
|
83
83
|
*
|
|
84
|
-
* @param {string} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
84
|
+
* @param {string|string[]} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
85
85
|
* @param {handler} handler - Callback function to be called when event fires.
|
|
86
86
|
*/
|
|
87
|
-
on(event: string, handler: handler): void;
|
|
87
|
+
on(event: string | string[], handler: handler): void;
|
|
88
88
|
/**
|
|
89
89
|
* Registers an event listener that runs only once, then is removed.
|
|
90
90
|
*
|
|
91
|
-
* @param {string} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
91
|
+
* @param {string|string[]} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
92
92
|
* @param {handler} handler - The callback function to run on event.
|
|
93
|
-
* @returns {handler} - The wrapped version of the handler.
|
|
93
|
+
* @returns {handler[]} - The wrapped version of the handler.
|
|
94
94
|
*/
|
|
95
|
-
once(event: string, handler: handler): handler;
|
|
95
|
+
once(event: string | string[], handler: handler): handler[];
|
|
96
96
|
/**
|
|
97
97
|
* Removes a previously registered event listener.
|
|
98
98
|
*
|
|
99
|
-
* @param {string} event - The name of the event to remove the handler from.
|
|
99
|
+
* @param {string|string[]} event - The name of the event to remove the handler from.
|
|
100
100
|
* @param {handler} handler - The specific callback function to remove.
|
|
101
101
|
*/
|
|
102
|
-
off(event: string, handler: handler): void;
|
|
102
|
+
off(event: string | string[], handler: handler): void;
|
|
103
103
|
/**
|
|
104
104
|
* Removes all event listeners of a specific type from the element.
|
|
105
105
|
*
|
|
106
|
-
* @param {string} event - The event type to remove (e.g. 'onScrollBoundary').
|
|
106
|
+
* @param {string|string[]} event - The event type to remove (e.g. 'onScrollBoundary').
|
|
107
107
|
*/
|
|
108
|
-
offAll(event: string): void;
|
|
108
|
+
offAll(event: string | string[]): void;
|
|
109
109
|
/**
|
|
110
110
|
* Removes all event listeners of all types from the element.
|
|
111
111
|
*/
|
|
@@ -44,7 +44,7 @@ class TinyIframeEvents {
|
|
|
44
44
|
/**
|
|
45
45
|
* Adds a listener to the beginning of the listeners array for the specified event.
|
|
46
46
|
*
|
|
47
|
-
* @param {string} event - Event name.
|
|
47
|
+
* @param {string|string[]} event - Event name.
|
|
48
48
|
* @param {handler} handler - The callback function.
|
|
49
49
|
*/
|
|
50
50
|
prependListener(event, handler) {
|
|
@@ -53,9 +53,9 @@ class TinyIframeEvents {
|
|
|
53
53
|
/**
|
|
54
54
|
* Adds a one-time listener to the beginning of the listeners array for the specified event.
|
|
55
55
|
*
|
|
56
|
-
* @param {string} event - Event name.
|
|
56
|
+
* @param {string|string[]} event - Event name.
|
|
57
57
|
* @param {handler} handler - The callback function.
|
|
58
|
-
* @returns {handler} - The wrapped handler used internally.
|
|
58
|
+
* @returns {handler[]} - The wrapped handler used internally.
|
|
59
59
|
*/
|
|
60
60
|
prependListenerOnce(event, handler) {
|
|
61
61
|
return this.#events.prependListenerOnce(event, handler);
|
|
@@ -64,7 +64,7 @@ class TinyIframeEvents {
|
|
|
64
64
|
/**
|
|
65
65
|
* Adds a event listener.
|
|
66
66
|
*
|
|
67
|
-
* @param {string} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
67
|
+
* @param {string|string[]} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
68
68
|
* @param {handler} handler - Callback function to be called when event fires.
|
|
69
69
|
*/
|
|
70
70
|
appendListener(event, handler) {
|
|
@@ -73,9 +73,9 @@ class TinyIframeEvents {
|
|
|
73
73
|
/**
|
|
74
74
|
* Registers an event listener that runs only once, then is removed.
|
|
75
75
|
*
|
|
76
|
-
* @param {string} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
76
|
+
* @param {string|string[]} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
77
77
|
* @param {handler} handler - The callback function to run on event.
|
|
78
|
-
* @returns {handler} - The wrapped version of the handler.
|
|
78
|
+
* @returns {handler[]} - The wrapped version of the handler.
|
|
79
79
|
*/
|
|
80
80
|
appendListenerOnce(event, handler) {
|
|
81
81
|
return this.#events.appendListenerOnce(event, handler);
|
|
@@ -83,7 +83,7 @@ class TinyIframeEvents {
|
|
|
83
83
|
/**
|
|
84
84
|
* Adds a event listener.
|
|
85
85
|
*
|
|
86
|
-
* @param {string} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
86
|
+
* @param {string|string[]} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
87
87
|
* @param {handler} handler - Callback function to be called when event fires.
|
|
88
88
|
*/
|
|
89
89
|
on(event, handler) {
|
|
@@ -92,9 +92,9 @@ class TinyIframeEvents {
|
|
|
92
92
|
/**
|
|
93
93
|
* Registers an event listener that runs only once, then is removed.
|
|
94
94
|
*
|
|
95
|
-
* @param {string} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
95
|
+
* @param {string|string[]} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
96
96
|
* @param {handler} handler - The callback function to run on event.
|
|
97
|
-
* @returns {handler} - The wrapped version of the handler.
|
|
97
|
+
* @returns {handler[]} - The wrapped version of the handler.
|
|
98
98
|
*/
|
|
99
99
|
once(event, handler) {
|
|
100
100
|
return this.#events.once(event, handler);
|
|
@@ -103,7 +103,7 @@ class TinyIframeEvents {
|
|
|
103
103
|
/**
|
|
104
104
|
* Removes a previously registered event listener.
|
|
105
105
|
*
|
|
106
|
-
* @param {string} event - The name of the event to remove the handler from.
|
|
106
|
+
* @param {string|string[]} event - The name of the event to remove the handler from.
|
|
107
107
|
* @param {handler} handler - The specific callback function to remove.
|
|
108
108
|
*/
|
|
109
109
|
off(event, handler) {
|
|
@@ -112,7 +112,7 @@ class TinyIframeEvents {
|
|
|
112
112
|
/**
|
|
113
113
|
* Removes all event listeners of a specific type from the element.
|
|
114
114
|
*
|
|
115
|
-
* @param {string} event - The event type to remove (e.g. 'onScrollBoundary').
|
|
115
|
+
* @param {string|string[]} event - The event type to remove (e.g. 'onScrollBoundary').
|
|
116
116
|
*/
|
|
117
117
|
offAll(event) {
|
|
118
118
|
return this.#events.offAll(event);
|
|
@@ -121,7 +121,7 @@ class TinyLocalStorage {
|
|
|
121
121
|
/**
|
|
122
122
|
* Adds a listener to the beginning of the listeners array for the specified event.
|
|
123
123
|
*
|
|
124
|
-
* @param {string} event - Event name.
|
|
124
|
+
* @param {string|string[]} event - Event name.
|
|
125
125
|
* @param {handler} handler - The callback function.
|
|
126
126
|
*/
|
|
127
127
|
prependListener(event, handler) {
|
|
@@ -131,9 +131,9 @@ class TinyLocalStorage {
|
|
|
131
131
|
/**
|
|
132
132
|
* Adds a one-time listener to the beginning of the listeners array for the specified event.
|
|
133
133
|
*
|
|
134
|
-
* @param {string} event - Event name.
|
|
134
|
+
* @param {string|string[]} event - Event name.
|
|
135
135
|
* @param {handler} handler - The callback function.
|
|
136
|
-
* @returns {handler} - The wrapped handler used internally.
|
|
136
|
+
* @returns {handler[]} - The wrapped handler used internally.
|
|
137
137
|
*/
|
|
138
138
|
prependListenerOnce(event, handler) {
|
|
139
139
|
return this.#events.prependListenerOnce(event, handler);
|
|
@@ -144,7 +144,7 @@ class TinyLocalStorage {
|
|
|
144
144
|
/**
|
|
145
145
|
* Adds a event listener.
|
|
146
146
|
*
|
|
147
|
-
* @param {string} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
147
|
+
* @param {string|string[]} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
148
148
|
* @param {handler} handler - Callback function to be called when event fires.
|
|
149
149
|
*/
|
|
150
150
|
appendListener(event, handler) {
|
|
@@ -154,9 +154,9 @@ class TinyLocalStorage {
|
|
|
154
154
|
/**
|
|
155
155
|
* Registers an event listener that runs only once, then is removed.
|
|
156
156
|
*
|
|
157
|
-
* @param {string} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
157
|
+
* @param {string|string[]} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
158
158
|
* @param {handler} handler - The callback function to run on event.
|
|
159
|
-
* @returns {handler} - The wrapped version of the handler.
|
|
159
|
+
* @returns {handler[]} - The wrapped version of the handler.
|
|
160
160
|
*/
|
|
161
161
|
appendListenerOnce(event, handler) {
|
|
162
162
|
return this.#events.appendListenerOnce(event, handler);
|
|
@@ -165,7 +165,7 @@ class TinyLocalStorage {
|
|
|
165
165
|
/**
|
|
166
166
|
* Adds a event listener.
|
|
167
167
|
*
|
|
168
|
-
* @param {string} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
168
|
+
* @param {string|string[]} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
169
169
|
* @param {handler} handler - Callback function to be called when event fires.
|
|
170
170
|
*/
|
|
171
171
|
on(event, handler) {
|
|
@@ -175,9 +175,9 @@ class TinyLocalStorage {
|
|
|
175
175
|
/**
|
|
176
176
|
* Registers an event listener that runs only once, then is removed.
|
|
177
177
|
*
|
|
178
|
-
* @param {string} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
178
|
+
* @param {string|string[]} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
179
179
|
* @param {handler} handler - The callback function to run on event.
|
|
180
|
-
* @returns {handler} - The wrapped version of the handler.
|
|
180
|
+
* @returns {handler[]} - The wrapped version of the handler.
|
|
181
181
|
*/
|
|
182
182
|
once(event, handler) {
|
|
183
183
|
return this.#events.once(event, handler);
|
|
@@ -188,7 +188,7 @@ class TinyLocalStorage {
|
|
|
188
188
|
/**
|
|
189
189
|
* Removes a previously registered event listener.
|
|
190
190
|
*
|
|
191
|
-
* @param {string} event - The name of the event to remove the handler from.
|
|
191
|
+
* @param {string|string[]} event - The name of the event to remove the handler from.
|
|
192
192
|
* @param {handler} handler - The specific callback function to remove.
|
|
193
193
|
*/
|
|
194
194
|
off(event, handler) {
|
|
@@ -198,7 +198,7 @@ class TinyLocalStorage {
|
|
|
198
198
|
/**
|
|
199
199
|
* Removes all event listeners of a specific type from the element.
|
|
200
200
|
*
|
|
201
|
-
* @param {string} event - The event type to remove (e.g. 'onScrollBoundary').
|
|
201
|
+
* @param {string|string[]} event - The event type to remove (e.g. 'onScrollBoundary').
|
|
202
202
|
*/
|
|
203
203
|
offAll(event) {
|
|
204
204
|
return this.#events.offAll(event);
|
|
@@ -269,7 +269,7 @@ class TinyLocalStorage {
|
|
|
269
269
|
*
|
|
270
270
|
* @param {string} event - The event name to emit.
|
|
271
271
|
* @param {...any} payload - Optional data to pass to each handler.
|
|
272
|
-
* @returns {boolean} True if any listeners were called, false otherwise.
|
|
272
|
+
* @returns {boolean[]} True if any listeners were called, false otherwise.
|
|
273
273
|
*/
|
|
274
274
|
emit(event, ...payload) {
|
|
275
275
|
return this.#events.emit(event, ...payload);
|
|
@@ -152,61 +152,61 @@ declare class TinyLocalStorage {
|
|
|
152
152
|
/**
|
|
153
153
|
* Adds a listener to the beginning of the listeners array for the specified event.
|
|
154
154
|
*
|
|
155
|
-
* @param {string} event - Event name.
|
|
155
|
+
* @param {string|string[]} event - Event name.
|
|
156
156
|
* @param {handler} handler - The callback function.
|
|
157
157
|
*/
|
|
158
|
-
prependListener(event: string, handler: import("./TinyEvents.mjs").handler): void;
|
|
158
|
+
prependListener(event: string | string[], handler: import("./TinyEvents.mjs").handler): void;
|
|
159
159
|
/**
|
|
160
160
|
* Adds a one-time listener to the beginning of the listeners array for the specified event.
|
|
161
161
|
*
|
|
162
|
-
* @param {string} event - Event name.
|
|
162
|
+
* @param {string|string[]} event - Event name.
|
|
163
163
|
* @param {handler} handler - The callback function.
|
|
164
|
-
* @returns {handler} - The wrapped handler used internally.
|
|
164
|
+
* @returns {handler[]} - The wrapped handler used internally.
|
|
165
165
|
*/
|
|
166
|
-
prependListenerOnce(event: string, handler: import("./TinyEvents.mjs").handler): import("./TinyEvents.mjs").handler;
|
|
166
|
+
prependListenerOnce(event: string | string[], handler: import("./TinyEvents.mjs").handler): import("./TinyEvents.mjs").handler[];
|
|
167
167
|
/**
|
|
168
168
|
* Adds a event listener.
|
|
169
169
|
*
|
|
170
|
-
* @param {string} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
170
|
+
* @param {string|string[]} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
171
171
|
* @param {handler} handler - Callback function to be called when event fires.
|
|
172
172
|
*/
|
|
173
|
-
appendListener(event: string, handler: import("./TinyEvents.mjs").handler): void;
|
|
173
|
+
appendListener(event: string | string[], handler: import("./TinyEvents.mjs").handler): void;
|
|
174
174
|
/**
|
|
175
175
|
* Registers an event listener that runs only once, then is removed.
|
|
176
176
|
*
|
|
177
|
-
* @param {string} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
177
|
+
* @param {string|string[]} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
178
178
|
* @param {handler} handler - The callback function to run on event.
|
|
179
|
-
* @returns {handler} - The wrapped version of the handler.
|
|
179
|
+
* @returns {handler[]} - The wrapped version of the handler.
|
|
180
180
|
*/
|
|
181
|
-
appendListenerOnce(event: string, handler: import("./TinyEvents.mjs").handler): import("./TinyEvents.mjs").handler;
|
|
181
|
+
appendListenerOnce(event: string | string[], handler: import("./TinyEvents.mjs").handler): import("./TinyEvents.mjs").handler[];
|
|
182
182
|
/**
|
|
183
183
|
* Adds a event listener.
|
|
184
184
|
*
|
|
185
|
-
* @param {string} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
185
|
+
* @param {string|string[]} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
186
186
|
* @param {handler} handler - Callback function to be called when event fires.
|
|
187
187
|
*/
|
|
188
|
-
on(event: string, handler: import("./TinyEvents.mjs").handler): void;
|
|
188
|
+
on(event: string | string[], handler: import("./TinyEvents.mjs").handler): void;
|
|
189
189
|
/**
|
|
190
190
|
* Registers an event listener that runs only once, then is removed.
|
|
191
191
|
*
|
|
192
|
-
* @param {string} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
192
|
+
* @param {string|string[]} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
193
193
|
* @param {handler} handler - The callback function to run on event.
|
|
194
|
-
* @returns {handler} - The wrapped version of the handler.
|
|
194
|
+
* @returns {handler[]} - The wrapped version of the handler.
|
|
195
195
|
*/
|
|
196
|
-
once(event: string, handler: import("./TinyEvents.mjs").handler): import("./TinyEvents.mjs").handler;
|
|
196
|
+
once(event: string | string[], handler: import("./TinyEvents.mjs").handler): import("./TinyEvents.mjs").handler[];
|
|
197
197
|
/**
|
|
198
198
|
* Removes a previously registered event listener.
|
|
199
199
|
*
|
|
200
|
-
* @param {string} event - The name of the event to remove the handler from.
|
|
200
|
+
* @param {string|string[]} event - The name of the event to remove the handler from.
|
|
201
201
|
* @param {handler} handler - The specific callback function to remove.
|
|
202
202
|
*/
|
|
203
|
-
off(event: string, handler: import("./TinyEvents.mjs").handler): void;
|
|
203
|
+
off(event: string | string[], handler: import("./TinyEvents.mjs").handler): void;
|
|
204
204
|
/**
|
|
205
205
|
* Removes all event listeners of a specific type from the element.
|
|
206
206
|
*
|
|
207
|
-
* @param {string} event - The event type to remove (e.g. 'onScrollBoundary').
|
|
207
|
+
* @param {string|string[]} event - The event type to remove (e.g. 'onScrollBoundary').
|
|
208
208
|
*/
|
|
209
|
-
offAll(event: string): void;
|
|
209
|
+
offAll(event: string | string[]): void;
|
|
210
210
|
/**
|
|
211
211
|
* Removes all event listeners of all types from the element.
|
|
212
212
|
*/
|
|
@@ -250,9 +250,9 @@ declare class TinyLocalStorage {
|
|
|
250
250
|
*
|
|
251
251
|
* @param {string} event - The event name to emit.
|
|
252
252
|
* @param {...any} payload - Optional data to pass to each handler.
|
|
253
|
-
* @returns {boolean} True if any listeners were called, false otherwise.
|
|
253
|
+
* @returns {boolean[]} True if any listeners were called, false otherwise.
|
|
254
254
|
*/
|
|
255
|
-
emit(event: string, ...payload: any[]): boolean;
|
|
255
|
+
emit(event: string, ...payload: any[]): boolean[];
|
|
256
256
|
/**
|
|
257
257
|
* Sets the maximum number of listeners per event before a warning is shown.
|
|
258
258
|
*
|
|
@@ -105,7 +105,7 @@ class TinyLocalStorage {
|
|
|
105
105
|
/**
|
|
106
106
|
* Adds a listener to the beginning of the listeners array for the specified event.
|
|
107
107
|
*
|
|
108
|
-
* @param {string} event - Event name.
|
|
108
|
+
* @param {string|string[]} event - Event name.
|
|
109
109
|
* @param {handler} handler - The callback function.
|
|
110
110
|
*/
|
|
111
111
|
prependListener(event, handler) {
|
|
@@ -114,9 +114,9 @@ class TinyLocalStorage {
|
|
|
114
114
|
/**
|
|
115
115
|
* Adds a one-time listener to the beginning of the listeners array for the specified event.
|
|
116
116
|
*
|
|
117
|
-
* @param {string} event - Event name.
|
|
117
|
+
* @param {string|string[]} event - Event name.
|
|
118
118
|
* @param {handler} handler - The callback function.
|
|
119
|
-
* @returns {handler} - The wrapped handler used internally.
|
|
119
|
+
* @returns {handler[]} - The wrapped handler used internally.
|
|
120
120
|
*/
|
|
121
121
|
prependListenerOnce(event, handler) {
|
|
122
122
|
return this.#events.prependListenerOnce(event, handler);
|
|
@@ -125,7 +125,7 @@ class TinyLocalStorage {
|
|
|
125
125
|
/**
|
|
126
126
|
* Adds a event listener.
|
|
127
127
|
*
|
|
128
|
-
* @param {string} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
128
|
+
* @param {string|string[]} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
129
129
|
* @param {handler} handler - Callback function to be called when event fires.
|
|
130
130
|
*/
|
|
131
131
|
appendListener(event, handler) {
|
|
@@ -134,9 +134,9 @@ class TinyLocalStorage {
|
|
|
134
134
|
/**
|
|
135
135
|
* Registers an event listener that runs only once, then is removed.
|
|
136
136
|
*
|
|
137
|
-
* @param {string} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
137
|
+
* @param {string|string[]} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
138
138
|
* @param {handler} handler - The callback function to run on event.
|
|
139
|
-
* @returns {handler} - The wrapped version of the handler.
|
|
139
|
+
* @returns {handler[]} - The wrapped version of the handler.
|
|
140
140
|
*/
|
|
141
141
|
appendListenerOnce(event, handler) {
|
|
142
142
|
return this.#events.appendListenerOnce(event, handler);
|
|
@@ -144,7 +144,7 @@ class TinyLocalStorage {
|
|
|
144
144
|
/**
|
|
145
145
|
* Adds a event listener.
|
|
146
146
|
*
|
|
147
|
-
* @param {string} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
147
|
+
* @param {string|string[]} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
148
148
|
* @param {handler} handler - Callback function to be called when event fires.
|
|
149
149
|
*/
|
|
150
150
|
on(event, handler) {
|
|
@@ -153,9 +153,9 @@ class TinyLocalStorage {
|
|
|
153
153
|
/**
|
|
154
154
|
* Registers an event listener that runs only once, then is removed.
|
|
155
155
|
*
|
|
156
|
-
* @param {string} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
156
|
+
* @param {string|string[]} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
157
157
|
* @param {handler} handler - The callback function to run on event.
|
|
158
|
-
* @returns {handler} - The wrapped version of the handler.
|
|
158
|
+
* @returns {handler[]} - The wrapped version of the handler.
|
|
159
159
|
*/
|
|
160
160
|
once(event, handler) {
|
|
161
161
|
return this.#events.once(event, handler);
|
|
@@ -164,7 +164,7 @@ class TinyLocalStorage {
|
|
|
164
164
|
/**
|
|
165
165
|
* Removes a previously registered event listener.
|
|
166
166
|
*
|
|
167
|
-
* @param {string} event - The name of the event to remove the handler from.
|
|
167
|
+
* @param {string|string[]} event - The name of the event to remove the handler from.
|
|
168
168
|
* @param {handler} handler - The specific callback function to remove.
|
|
169
169
|
*/
|
|
170
170
|
off(event, handler) {
|
|
@@ -173,7 +173,7 @@ class TinyLocalStorage {
|
|
|
173
173
|
/**
|
|
174
174
|
* Removes all event listeners of a specific type from the element.
|
|
175
175
|
*
|
|
176
|
-
* @param {string} event - The event type to remove (e.g. 'onScrollBoundary').
|
|
176
|
+
* @param {string|string[]} event - The event type to remove (e.g. 'onScrollBoundary').
|
|
177
177
|
*/
|
|
178
178
|
offAll(event) {
|
|
179
179
|
return this.#events.offAll(event);
|
|
@@ -235,7 +235,7 @@ class TinyLocalStorage {
|
|
|
235
235
|
*
|
|
236
236
|
* @param {string} event - The event name to emit.
|
|
237
237
|
* @param {...any} payload - Optional data to pass to each handler.
|
|
238
|
-
* @returns {boolean} True if any listeners were called, false otherwise.
|
|
238
|
+
* @returns {boolean[]} True if any listeners were called, false otherwise.
|
|
239
239
|
*/
|
|
240
240
|
emit(event, ...payload) {
|
|
241
241
|
return this.#events.emit(event, ...payload);
|
|
@@ -52,7 +52,7 @@ class TinyNewWinEvents {
|
|
|
52
52
|
/**
|
|
53
53
|
* Adds a listener to the beginning of the listeners array for the specified event.
|
|
54
54
|
*
|
|
55
|
-
* @param {string} event - Event name.
|
|
55
|
+
* @param {string|string[]} event - Event name.
|
|
56
56
|
* @param {handler} handler - The callback function.
|
|
57
57
|
*/
|
|
58
58
|
prependListener(event, handler) {
|
|
@@ -62,9 +62,9 @@ class TinyNewWinEvents {
|
|
|
62
62
|
/**
|
|
63
63
|
* Adds a one-time listener to the beginning of the listeners array for the specified event.
|
|
64
64
|
*
|
|
65
|
-
* @param {string} event - Event name.
|
|
65
|
+
* @param {string|string[]} event - Event name.
|
|
66
66
|
* @param {handler} handler - The callback function.
|
|
67
|
-
* @returns {handler} - The wrapped handler used internally.
|
|
67
|
+
* @returns {handler[]} - The wrapped handler used internally.
|
|
68
68
|
*/
|
|
69
69
|
prependListenerOnce(event, handler) {
|
|
70
70
|
return this.#events.prependListenerOnce(event, handler);
|
|
@@ -75,7 +75,7 @@ class TinyNewWinEvents {
|
|
|
75
75
|
/**
|
|
76
76
|
* Adds a event listener.
|
|
77
77
|
*
|
|
78
|
-
* @param {string} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
78
|
+
* @param {string|string[]} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
79
79
|
* @param {handler} handler - Callback function to be called when event fires.
|
|
80
80
|
*/
|
|
81
81
|
appendListener(event, handler) {
|
|
@@ -85,9 +85,9 @@ class TinyNewWinEvents {
|
|
|
85
85
|
/**
|
|
86
86
|
* Registers an event listener that runs only once, then is removed.
|
|
87
87
|
*
|
|
88
|
-
* @param {string} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
88
|
+
* @param {string|string[]} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
89
89
|
* @param {handler} handler - The callback function to run on event.
|
|
90
|
-
* @returns {handler} - The wrapped version of the handler.
|
|
90
|
+
* @returns {handler[]} - The wrapped version of the handler.
|
|
91
91
|
*/
|
|
92
92
|
appendListenerOnce(event, handler) {
|
|
93
93
|
return this.#events.appendListenerOnce(event, handler);
|
|
@@ -96,7 +96,7 @@ class TinyNewWinEvents {
|
|
|
96
96
|
/**
|
|
97
97
|
* Adds a event listener.
|
|
98
98
|
*
|
|
99
|
-
* @param {string} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
99
|
+
* @param {string|string[]} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
100
100
|
* @param {handler} handler - Callback function to be called when event fires.
|
|
101
101
|
*/
|
|
102
102
|
on(event, handler) {
|
|
@@ -106,9 +106,9 @@ class TinyNewWinEvents {
|
|
|
106
106
|
/**
|
|
107
107
|
* Registers an event listener that runs only once, then is removed.
|
|
108
108
|
*
|
|
109
|
-
* @param {string} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
109
|
+
* @param {string|string[]} event - Event name, such as 'onScrollBoundary' or 'onAutoScroll'.
|
|
110
110
|
* @param {handler} handler - The callback function to run on event.
|
|
111
|
-
* @returns {handler} - The wrapped version of the handler.
|
|
111
|
+
* @returns {handler[]} - The wrapped version of the handler.
|
|
112
112
|
*/
|
|
113
113
|
once(event, handler) {
|
|
114
114
|
return this.#events.once(event, handler);
|
|
@@ -119,7 +119,7 @@ class TinyNewWinEvents {
|
|
|
119
119
|
/**
|
|
120
120
|
* Removes a previously registered event listener.
|
|
121
121
|
*
|
|
122
|
-
* @param {string} event - The name of the event to remove the handler from.
|
|
122
|
+
* @param {string|string[]} event - The name of the event to remove the handler from.
|
|
123
123
|
* @param {handler} handler - The specific callback function to remove.
|
|
124
124
|
*/
|
|
125
125
|
off(event, handler) {
|
|
@@ -129,7 +129,7 @@ class TinyNewWinEvents {
|
|
|
129
129
|
/**
|
|
130
130
|
* Removes all event listeners of a specific type from the element.
|
|
131
131
|
*
|
|
132
|
-
* @param {string} event - The event type to remove (e.g. 'onScrollBoundary').
|
|
132
|
+
* @param {string|string[]} event - The event type to remove (e.g. 'onScrollBoundary').
|
|
133
133
|
*/
|
|
134
134
|
offAll(event) {
|
|
135
135
|
return this.#events.offAll(event);
|