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