Skip to content

[resize-observer] add possibility to observe offset changes #3877

@HolgerJeromin

Description

@HolgerJeromin

In the entries of the ResizeObserver we have the contentRect and/or borderBoxSize.

For our application we need to call code when the offset and size of a Element has changed.
But sadly the ResizeObserver is not called when the position has changed.
For us it would be nice if I could add an option to observe the offset, too.

Observing the attributes with MutationObserver and checking a diff in all boundingRects has the downside of forced reflow in many cases.

ref #3550 where delivering offsets was rejected, as they are not observed.

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