Update devtools page titles.

This commit is contained in:
Josh Matthews 2020-04-28 15:40:16 -04:00
parent b53ce5c79a
commit 02ce6188aa
4 changed files with 48 additions and 0 deletions

View file

@ -934,6 +934,14 @@ impl Document {
pub fn title_changed(&self) {
if self.browsing_context().is_some() {
self.send_title_to_embedder();
let global = self.window.upcast::<GlobalScope>();
if let Some(ref chan) = global.devtools_chan() {
let title = String::from(self.Title());
let _ = chan.send(ScriptToDevtoolsControlMsg::TitleChanged(
global.pipeline_id(),
title,
));
}
}
}