This commit is contained in:
2025-12-02 01:54:59 +02:00
parent c5ca4162a3
commit 2c998d7ba8
33 changed files with 419 additions and 446 deletions
+2 -6
View File
@@ -15,14 +15,10 @@ export class Ut {
static trigger = (handler, ...args) => typeof handler === 'function' ? handler.call(this, ...args) : null;
static each(obj, callback, context) {
for (let key in obj) {
callback.call(context || this, obj[key], key);
}
}
static each = (obj, callback, context) => obj && Object.keys(obj).forEach(key => callback.call(context ?? this, obj[key], key) );
static tplString = (str, context) => new Function('return `' + str + '`;').call(context || {});
static extendNode(name, value) {
if (!Object.getOwnPropertyDescriptor(Node.prototype, name)) {