Fake Layout Layer: getBoundingClientRect, getComputedStyle, matchMedia, viewport #7
Labels
No labels
bug
docs
feature
housekeeping
html-spec
performance
react-compat
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
glow-all/true-headless-browser#7
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Implement fake layout layer: getBoundingClientRect, getComputedStyle, matchMedia, viewport metrics, scroll APIs. All return deterministic synthetic values — no CSS engine.
What to Build
src/fakes/layout.ts
Required Layout Behaviors
FakeComputedStyle
Inline Style Influence
Parse basic inline styles from element.getAttribute('style'):
This is enough for lazy loaders and visibility checks.
Tests
Unit Tests
Edge Cases
Definition of Done
Fake Layout Layer: getBoundingClientRect, getComputedStyle, matchMedia, viewport. ✅ Implementiert in src/fakes/layout.ts. Tests: layout.test.ts.