update js linting

This commit is contained in:
Vladimir Mandic
2024-04-16 16:17:46 -04:00
parent 83c078b28e
commit 2ad029834d
3 changed files with 22 additions and 6 deletions
+10
View File
@@ -23,6 +23,16 @@ function gradioApp() {
return elem.shadowRoot ? elem.shadowRoot : elem;
}
function logFn(func) {
return async function () { // eslint-disable-line func-names
const t0 = performance.now();
const returnValue = func(...arguments);
const t1 = performance.now();
log(func.name, Math.round(t1 - t0) / 1000);
return returnValue;
};
}
function getUICurrentTab() {
return gradioApp().querySelector('#tabs button.selected');
}