Send LoadStart event when the actual pipeline is loading

This commit is contained in:
Paul Rouget 2020-06-22 07:17:32 +02:00
parent 3f999ce785
commit b5b8d462f2
2 changed files with 6 additions and 20 deletions

View file

@ -997,9 +997,15 @@ impl Document {
pub fn set_ready_state(&self, state: DocumentReadyState) {
match state {
DocumentReadyState::Loading => {
if self.window().is_top_level() {
self.send_to_embedder(EmbedderMsg::LoadStart);
}
update_with_current_time_ms(&self.dom_loading);
},
DocumentReadyState::Complete => {
if self.window().is_top_level() {
self.send_to_embedder(EmbedderMsg::LoadComplete);
}
update_with_current_time_ms(&self.dom_complete);
},
DocumentReadyState::Interactive => update_with_current_time_ms(&self.dom_interactive),