8000 [resize-observer] devicePixelContentBoxSize is always present in ResizeObserverEntry whether or not it's being observed · Issue #6608 · w3c/csswg-drafts · GitHub
[go: up one dir, main page]

Skip to content

[resize-observer] devicePixelContentBoxSize is always present in ResizeObserverEntry whether or not it's being observed #6608

@smfr

Description

@smfr

https://drafts.csswg.org/resize-observer/#resize-observer-entry-interface shows that devicePixelContentBoxSize is always present in the entry.

The spec notes that observing device-pixel-content-box can be expensive because the UA has to compute it every time, but because devicePixelContentBoxSize is always present in ResizeObserverEntry, whether or not it's being observed, then the UA has to compute it on every callback anyway.

It would be better if the spec allowed devicePixelContentBoxSize to be optional, and only present when being observed.

cc @atotic

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0