diff options
author | Josh Matthews <josh@joshmatthews.net> | 2014-10-13 08:20:06 -0400 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2015-05-11 13:41:51 -0400 |
commit | 7f0706ed42b33ec1da6bf9741811ca97d566ed45 (patch) | |
tree | 9d74b8a50145afb05bd10d6860227f4af17a5754 /components/script/dom/node.rs | |
parent | 29a43a00b39e544596e3bcce9bdfca2159313ba5 (diff) | |
download | servo-7f0706ed42b33ec1da6bf9741811ca97d566ed45.tar.gz servo-7f0706ed42b33ec1da6bf9741811ca97d566ed45.zip |
Implement a DocumentLoader type that tracks pending loads and notifies the script task when the queue is empty. Dispatch the document load event based on the DocumentLoader's notification.
Diffstat (limited to 'components/script/dom/node.rs')
-rw-r--r-- | components/script/dom/node.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs index 048ee28b3a9..170ff22e5a1 100644 --- a/components/script/dom/node.rs +++ b/components/script/dom/node.rs @@ -4,6 +4,7 @@ //! The core DOM types. Defines the basic DOM hierarchy as well as all the HTML elements. +use document_loader::DocumentLoader; use dom::attr::{Attr, AttrHelpers}; use dom::bindings::cell::DOMRefCell; use dom::bindings::codegen::Bindings::AttrBinding::AttrMethods; @@ -1711,9 +1712,10 @@ impl Node { false => IsHTMLDocument::NonHTMLDocument, }; let window = document.window().root(); + let loader = DocumentLoader::new(&*document.loader()); let document = Document::new(window.r(), Some(document.url()), is_html_doc, None, - None, DocumentSource::NotFromParser); + None, DocumentSource::NotFromParser, loader); NodeCast::from_temporary(document) }, NodeTypeId::Element(..) => { |