mirror of
https://github.com/servo/servo
synced 2026-04-25 17:15:48 +02:00
When media controls are removed (either by removing the controls attribute or by removing the element from the DOM), the shadow root's children are now cleared. This breaks the reference cycle between the js mediacontrols instance and the media element, the event listeners and this.media reference in the controls script would otherwise keep the element alive and prevent garbage collection. I tested the controls and it renders correctly and deleting a video with controls doesn't crash. Fixes: #43828 Signed-off-by: Messi002 <rostandmessi2@gmail.com>