aboutsummaryrefslogtreecommitdiffstats
path: root/components/script
diff options
context:
space:
mode:
Diffstat (limited to 'components/script')
-rw-r--r--components/script/dom/document.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs
index 4f4b43437e7..0057ab0bcf7 100644
--- a/components/script/dom/document.rs
+++ b/components/script/dom/document.rs
@@ -289,6 +289,7 @@ pub trait DocumentHelpers<'a> {
fn load_async(self, load: LoadType, listener: AsyncResponseTarget);
fn load_sync(self, load: LoadType) -> Result<(Metadata, Vec<u8>), String>;
fn finish_load(self, load: LoadType);
+ fn notify_constellation_load(self);
fn set_current_parser(self, script: Option<&ServoHTMLParser>);
fn get_current_parser(self) -> Option<Root<ServoHTMLParser>>;
fn find_iframe(self, subpage_id: SubpageId) -> Option<Root<HTMLIFrameElement>>;
@@ -986,6 +987,15 @@ impl<'a> DocumentHelpers<'a> for &'a Document {
loader.finish_load(load);
}
+ fn notify_constellation_load(self) {
+ let window = self.window.root();
+ let pipeline_id = window.r().pipeline();
+ let ConstellationChan(ref chan) = window.r().constellation_chan();
+ let event = ConstellationMsg::DOMLoad(pipeline_id);
+ chan.send(event).unwrap();
+
+ }
+
fn set_current_parser(self, script: Option<&ServoHTMLParser>) {
self.current_parser.set(script.map(JS::from_ref));
}
@@ -1904,6 +1914,8 @@ impl DocumentProgressHandler {
event.r().fire(target);
});
+ document.r().notify_constellation_load();
+
// https://developer.mozilla.org/en-US/docs/Web/Events/mozbrowserloadend
document.r().trigger_mozbrowser_event(MozBrowserEvent::LoadEnd);