devtools: Treat session history traversal like a navigation.

This commit is contained in:
Josh Matthews 2020-08-10 17:52:22 -04:00
parent bd554a2a98
commit fd9be5097d
4 changed files with 36 additions and 2 deletions

View file

@ -1142,9 +1142,13 @@ impl Document {
pub fn title_changed(&self) {
if self.browsing_context().is_some() {
self.send_title_to_embedder();
let title = String::from(self.Title());
self.window.send_to_constellation(ScriptMsg::TitleChanged(
self.window.pipeline_id(),
title.clone(),
));
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,