Harden lint validation and browser shims

This commit is contained in:
vorotamoroz
2026-07-18 17:21:43 +00:00
parent 81d27a932f
commit ff01ca551a
5 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
import { promiseWithResolver, type PromiseWithResolvers } from "octagonal-wheels/promises";
import { promiseWithResolvers, type PromiseWithResolvers } from "octagonal-wheels/promises";
import { mount } from "svelte";
import MenuView from "./ui/MenuView.svelte";
import { _activeDocument } from "@vrtmrz/livesync-commonlib/compat/common/coreEnvFunctions";
@@ -45,7 +45,7 @@ export class Menu {
if (this.waitingForClose) {
this.waitingForClose.resolve();
}
this.waitingForClose = promiseWithResolver<void>();
this.waitingForClose = promiseWithResolvers<void>();
mount(MenuView, {
target: el,
props: {
@@ -23,14 +23,14 @@ export class ShimModal {
this.titleEl.className = "modal-title";
this.modalEl = _activeDocument.createElement("div");
this.modalEl.className = "modal";
this.modalEl.style.display = "none";
this.modalEl.hidden = true;
this.modalEl.appendChild(this.titleEl);
this.modalEl.appendChild(this.contentEl);
this.baseEl.appendChild(this.modalEl);
}
open() {
this.isOpen = true;
this.modalEl.style.display = "block";
this.modalEl.hidden = false;
if (!this.baseEl.parentElement) {
_activeDocument.body.appendChild(this.baseEl);
}
@@ -38,7 +38,7 @@ export class ShimModal {
}
close() {
this.isOpen = false;
this.baseEl.style.display = "none";
this.modalEl.hidden = true;
this.baseEl.remove();
this.onClose();
}