This commit is contained in:
parent
274b105676
commit
984a7388f1
|
@ -125,6 +125,7 @@ pub fn Title(
|
|||
match document().query_selector("title") {
|
||||
Ok(Some(title)) => title.unchecked_into(),
|
||||
_ => {
|
||||
let el_ref = meta.title.el.clone();
|
||||
let el = document().create_element("title").unwrap_throw();
|
||||
let head = document().head().unwrap_throw();
|
||||
head.append_child(el.unchecked_ref())
|
||||
|
@ -134,6 +135,7 @@ pub fn Title(
|
|||
let el = el.clone();
|
||||
move || {
|
||||
_ = head.remove_child(&el);
|
||||
*el_ref.borrow_mut() = None;
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue