Use the document base url when resolving script URLs

This commit is contained in:
Liamsi 2016-04-14 01:00:55 +02:00
parent d9ffefe562
commit 62182f9de9
2 changed files with 2 additions and 10 deletions

View file

@ -272,10 +272,7 @@ impl HTMLScriptElement {
// TODO: Step 15: environment settings object.
let window = window_from_node(self);
let window = window.r();
let base_url = window.get_url();
let base_url = doc.base_url();
let is_external = match element.get_attribute(&ns!(), &atom!("src")) {
// Step 16.
Some(ref src) => {
@ -300,7 +297,7 @@ impl HTMLScriptElement {
// Step 16.6.
// TODO(#9186): use the fetch infrastructure.
let script_chan = window.networking_task_source();
let script_chan = doc.window().networking_task_source();
let elem = Trusted::new(self, script_chan.clone());
let context = Arc::new(Mutex::new(ScriptContext {

View file

@ -1,5 +0,0 @@
[base.html]
type: testharness
[Script src with a base URL]
expected: FAIL