mirror of
https://github.com/lune-org/lune.git
synced 2024-12-13 13:30:38 +00:00
Use a read lock in clone_into_external_dom (#64)
This commit is contained in:
parent
63e2b926e6
commit
b0861ce0fb
1 changed files with 2 additions and 2 deletions
|
@ -141,8 +141,8 @@ impl Instance {
|
|||
*/
|
||||
pub fn clone_into_external_dom(self, external_dom: &mut WeakDom) -> DomRef {
|
||||
let dom = INTERNAL_DOM
|
||||
.try_write()
|
||||
.expect("Failed to get write access to document");
|
||||
.try_read()
|
||||
.expect("Failed to get read access to document");
|
||||
|
||||
let cloned = dom.clone_into_external(self.dom_ref, external_dom);
|
||||
external_dom.transfer_within(cloned, external_dom.root_ref());
|
||||
|
|
Loading…
Reference in a new issue