Skip to content

DOM: ResizeObserver real observation and delivery #340

Description

@mplsllc

Status

Current QuickJS capability auditing explicitly records ResizeObserver.observe() as a no-op. The constructor/API shape is not sufficient: layout-driven resize notifications are missing.

Scope

  • Register/unregister observed elements.
  • Detect size changes after layout/reformat, not from a polling guess detached from real box geometry.
  • Deliver bounded ResizeObserverEntry objects with at least target and a correct content rectangle/size surface.
  • Batch/coalesce delivery through the existing event-loop/job model.
  • Avoid re-entrant infinite resize loops; define a bounded loop/settlement policy suitable for the G3.
  • Release node/wrapper references on disconnect/navigation/realm teardown.

Acceptance

A controlled element changes width/height through CSS/DOM mutation, observer fires after layout with the new measured size, unchanged layout does not repeatedly fire, unobserve/disconnect stop delivery, and no reconvert loop occurs. Host tests plus G3 verification.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: js-engineDuktape, ES5 evaluator, JS bindingsenhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions