Skip to content

[0.42-r2 L1] prune disconnected shadow roots from __submitRoots after morph #588

Description

@SisyphusZheng

Severity: low · Category: implementation bug

Evidence. __submitRoots only grows; shadow roots removed by morphs stay referenced (listener + memory retention).

Fix. In __scanSubmitRoots, first prune entries whose root is no longer connected (!root.isConnected for ShadowRoot; keep document).


Filed from the 0.42 round-2 review (docs/audit/2026-07-28-alpha5-round2-review.md). Target line: 0.42.0-alpha.6.

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.42.0-alpha.60.42 round-2 review remediation (morph client hardening)bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions