1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Update luci-base

This commit is contained in:
Ycarus (Yannick Chabanois) 2019-08-02 22:34:03 +02:00
parent 0291791eed
commit 56382b4306
4 changed files with 75 additions and 32 deletions

View file

@ -23,6 +23,20 @@
});
}
/* Promise.finally polyfill */
if (typeof Promise.prototype.finally !== 'function') {
Promise.prototype.finally = function(fn) {
var onFinally = function(cb) {
return Promise.resolve(fn.call(this)).then(cb);
};
return this.then(
function(result) { return onFinally.call(this, function() { return result }) },
function(reason) { return onFinally.call(this, function() { return Promise.reject(reason) }) }
);
};
}
/*
* Class declaration and inheritance helper
*/
@ -1174,6 +1188,14 @@
return null;
return inst[method].apply(inst, inst.varargs(arguments, 2));
},
isEmpty: function(node) {
for (var child = node.firstElementChild; child != null; child = child.nextElementSibling)
if (!child.classList.contains('hidden'))
return false;
return true;
}
}),