mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Implement method to remove media controls
This commit is contained in:
parent
142d42a833
commit
23def72787
3 changed files with 24 additions and 6 deletions
|
@ -501,6 +501,15 @@ impl Element {
|
|||
|
||||
Ok(shadow_root)
|
||||
}
|
||||
|
||||
pub fn detach_shadow(&self) {
|
||||
if let Some(ref shadow_root) = self.shadow_root() {
|
||||
self.node.owner_doc().unregister_shadow_root(shadow_root);
|
||||
self.ensure_rare_data().shadow_root = None;
|
||||
} else {
|
||||
debug_assert!(false, "Trying to detach a non-attached shadow root");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue