mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Remove an unneeded helper function
This commit is contained in:
parent
69473b6c9c
commit
9bd0e2a3ac
1 changed files with 19 additions and 25 deletions
|
@ -500,18 +500,14 @@ pub fn parse_html(cx: *JSContext,
|
|||
debug!("encoding change");
|
||||
},
|
||||
complete_script: |script| {
|
||||
// A little function for holding this lint attr
|
||||
fn complete_script(script: hubbub::NodeDataPtr,
|
||||
url: Url,
|
||||
js_chan: SharedChan<JSMessage>) {
|
||||
unsafe {
|
||||
let scriptnode: AbstractNode<ScriptView> = NodeWrapping::from_hubbub_node(script);
|
||||
do scriptnode.with_imm_element |script| {
|
||||
match script.get_attr("src") {
|
||||
Some(src) => {
|
||||
debug!("found script: %s", src);
|
||||
let new_url = make_url(src.to_str(), Some(url.clone()));
|
||||
js_chan.send(JSTaskNewFile(new_url));
|
||||
let new_url = make_url(src.to_str(), Some(url3.clone()));
|
||||
js_chan2.send(JSTaskNewFile(new_url));
|
||||
}
|
||||
None => {
|
||||
let mut data = ~[];
|
||||
|
@ -524,13 +520,11 @@ pub fn parse_html(cx: *JSContext,
|
|||
}
|
||||
|
||||
debug!("script data = %?", data);
|
||||
js_chan.send(JSTaskNewInlineScript(data.concat(), url.clone()));
|
||||
js_chan2.send(JSTaskNewInlineScript(data.concat(), url3.clone()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
complete_script(script, url3.clone(), js_chan2.clone());
|
||||
debug!("complete script");
|
||||
},
|
||||
complete_style: |style| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue