aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/script_task.rs
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2014-05-15 23:11:32 +0530
committerManish Goregaokar <manishsmail@gmail.com>2014-05-20 21:01:12 +0530
commit533fab46f95ec64da3385851e0a09cae15211e90 (patch)
tree3325188f22df2ebb65ed52099fe66aebe7d71f38 /src/components/script/script_task.rs
parent90a0bcfa78ddf89031d54e4ed8ae84e2b171b4d0 (diff)
downloadservo-533fab46f95ec64da3385851e0a09cae15211e90.tar.gz
servo-533fab46f95ec64da3385851e0a09cae15211e90.zip
Async XHR GET with basic response header support
Diffstat (limited to 'src/components/script/script_task.rs')
-rw-r--r--src/components/script/script_task.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/components/script/script_task.rs b/src/components/script/script_task.rs
index a750903e45d..5a5ba61ddb8 100644
--- a/src/components/script/script_task.rs
+++ b/src/components/script/script_task.rs
@@ -21,6 +21,7 @@ use dom::eventtarget::{EventTarget, EventTargetHelpers};
use dom::node;
use dom::node::{Node, NodeHelpers};
use dom::window::{TimerId, Window, WindowHelpers};
+use dom::xmlhttprequest::{TrustedXHRAddress, XMLHttpRequest, XHRProgress};
use html::hubbub_html_parser::HtmlParserResult;
use html::hubbub_html_parser::{HtmlDiscoveredStyle, HtmlDiscoveredScript};
use html::hubbub_html_parser;
@@ -88,6 +89,8 @@ pub enum ScriptMsg {
ExitPipelineMsg(PipelineId),
/// Notifies the script that a window associated with a particular pipeline should be closed.
ExitWindowMsg(PipelineId),
+ /// Notifies the script of progress on a fetch
+ XHRProgressMsg(TrustedXHRAddress, XHRProgress)
}
pub struct NewLayoutInfo {
@@ -773,6 +776,7 @@ impl ScriptTask {
ExitPipelineMsg(id) => if self.handle_exit_pipeline_msg(id) { return false },
ExitWindowMsg(id) => self.handle_exit_window_msg(id),
ResizeMsg(..) => fail!("should have handled ResizeMsg already"),
+ XHRProgressMsg(addr, progress) => XMLHttpRequest::handle_xhr_progress(addr, progress),
}
}