Skip to content
This repository was archived by the owner on Aug 11, 2022. It is now read-only.
This repository was archived by the owner on Aug 11, 2022. It is now read-only.

Warn when a JS operation like getBoundingClientRect causes a hidden subtree to be 'activated/de-virtualized/rendered' #144

@bgirard

Description

@bgirard

AIUI from Issue #112, certain calls such as getBoundingClientRect() may defeat the optimization by causing the subtree to get activated/laid out.

Perhaps it would make sense to suggest implementation give a warning. For will-change, Firefox's implementation will issue a warning. IIRC it will warn once per page and will ignore if the total will-change surface area is 3x the document viewport to avoid OOM.

I think it would make sense to surface a one-off warning when code is defeating the optimization inadvertently. For instance I'm not sure if querySelecterAll('img') would defeat the optimization or not.

Metadata

Metadata

Assignees

Labels

enhancementthis issue tracks a future enhancement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions