diff options
author | 2024-08-05 11:30:59 +0000 | |
---|---|---|
committer | 2024-08-05 11:30:59 +0000 | |
commit | 3f27c9d934cd63b5425b7af18c423e99cee54dab (patch) | |
tree | 053cf1e7f1297c3e6357b5bad6338a4d32543044 | |
parent | 6e5676862b98ed5cadf1bc3d1920d992820ab936 (diff) | |
download | astro-3f27c9d934cd63b5425b7af18c423e99cee54dab.tar.gz astro-3f27c9d934cd63b5425b7af18c423e99cee54dab.tar.zst astro-3f27c9d934cd63b5425b7af18c423e99cee54dab.zip |
[ci] format
-rw-r--r-- | packages/astro/src/runtime/client/dev-toolbar/apps/audit/rules/perf.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/astro/src/runtime/client/dev-toolbar/apps/audit/rules/perf.ts b/packages/astro/src/runtime/client/dev-toolbar/apps/audit/rules/perf.ts index 83e829cb9..7a3de2307 100644 --- a/packages/astro/src/runtime/client/dev-toolbar/apps/audit/rules/perf.ts +++ b/packages/astro/src/runtime/client/dev-toolbar/apps/audit/rules/perf.ts @@ -36,7 +36,7 @@ export const perf: AuditRuleWithSelector[] = [ match(element) { const htmlElement = element as HTMLImageElement | HTMLIFrameElement; // Ignore elements that are above the fold, they should be loaded eagerly - const elementYPosition = htmlElement.getBoundingClientRect().y + window.scrollY + const elementYPosition = htmlElement.getBoundingClientRect().y + window.scrollY; if (elementYPosition < window.innerHeight) return false; // Ignore elements using `data:` URI, the `loading` attribute doesn't do anything for these @@ -55,7 +55,7 @@ export const perf: AuditRuleWithSelector[] = [ const htmlElement = element as HTMLImageElement | HTMLIFrameElement; // Ignore elements that are below the fold, they should be loaded lazily - const elementYPosition = htmlElement.getBoundingClientRect().y + window.scrollY + const elementYPosition = htmlElement.getBoundingClientRect().y + window.scrollY; if (elementYPosition > window.innerHeight) return false; // Ignore elements using `data:` URI, the `loading` attribute doesn't do anything for these |