mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
266a8f2f2e
When a component is created with shadow DOM encapsulation, we attach a shadow root to it. When the component is re-created during HMR, it was throwing an error because only one shadow root can be attached to a node at a time. Since there's no way to detach a shadow root from a node, these changes resolve the issue by making a shallow clone of the element, replacing it and using the clone for any future updates. Fixes #59588. PR Close #59597