scaling based on component size instead webview size

This commit is contained in:
Timo K.
2026-09-04 14:16:40 +02:00
parent f5458bb03e
commit 38c28a1c8f
11 changed files with 293 additions and 14 deletions
+9
View File
@@ -53,6 +53,15 @@ window.matchMedia = global.matchMedia = (): MediaQueryList =>
removeEventListener: () => {},
}) as Partial<MediaQueryList> as MediaQueryList;
// jsdom does no layout and has no ResizeObserver. The call view observes the
// size of its root element; this one reports nothing, so that element stays at
// whatever size jsdom says it is (zero) unless a test says otherwise.
window.ResizeObserver ??= class ResizeObserver {
public observe(): void {}
public unobserve(): void {}
public disconnect(): void {}
};
const storage: Record<string, string> = {};
const localStoragePolyfill = {
getItem(key: string) {