diff options
Diffstat (limited to 'components/script/script_thread.rs')
-rw-r--r-- | components/script/script_thread.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs index 67b862ed3f3..2230f254320 100644 --- a/components/script/script_thread.rs +++ b/components/script/script_thread.rs @@ -1841,6 +1841,9 @@ impl ScriptThread { let ConstellationChan(ref chan) = self.constellation_chan; chan.send(ConstellationMsg::ActivateDocument(incomplete.pipeline_id)).unwrap(); + // Notify devtools that a new script global exists. + self.notify_devtools(document.Title(), final_url.clone(), (page.pipeline(), None)); + let is_javascript = incomplete.url.scheme == "javascript"; let parse_input = if is_javascript { use url::percent_encoding::percent_decode_to; @@ -2200,11 +2203,6 @@ impl ScriptThread { document.process_deferred_scripts(); window.set_fragment_name(final_url.fragment.clone()); - - // Notify devtools that a new script global exists. - //TODO: should this happen as soon as the global is created, or at least once the first - // script runs? - self.notify_devtools(document.Title(), (*final_url).clone(), (id, None)); } fn handle_css_error_reporting(&self, pipeline_id: PipelineId, filename: String, |