INNER CODE UNIT · JavaScript
Promise
LeyckerS/moondownloader · web/app.js:260
await new Promise((resolve) => {
window.addEventListener("pywebviewready", () => resolve(true), { once: true });
setTimeout(() => resolve(!!(window.pywebview && window.pywebview.api)), 700);
});
this.api = (window.pywebview && window.pywebview.api)
? window.pywebview.api : new MockApi();
}
this.demo = this.api instanceof MockApi;
if (this.demo) $("#demoChip").hidden = false;
return this.api;
},
};
/* Refuse to pretend on a renderer that cannot draw this GUI. pywebview on
Windows can silently fall back to MSHTML (IE11), where grid, clamp(),
color-mix() and backdrop-filter do not exist and the page unrolls into a
single unstyled column. A clear banner beats a broken app. */
function engineTooOld() {