mirror of
https://github.com/servo/servo.git
synced 2025-07-14 19:03:40 +01:00
Use the document base url when resolving script URLs
This commit is contained in:
parent
d9ffefe562
commit
62182f9de9
2 changed files with 2 additions and 10 deletions
|
@ -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 {
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
[base.html]
|
||||
type: testharness
|
||||
[Script src with a base URL]
|
||||
expected: FAIL
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue