Commit e1684874 authored by Romain Courteaud's avatar Romain Courteaud

IE does not create an empty head element.

parent d390615d
...@@ -905,25 +905,28 @@ ...@@ -905,25 +905,28 @@
if (document_element.nodeType === 9) { if (document_element.nodeType === 9) {
settings.title = document_element.title; settings.title = document_element.title;
for (i = 0; i < document_element.head.children.length; i += 1) { if (document_element.head !== null) {
element = document_element.head.children[i]; for (i = 0; i < document_element.head.children.length; i += 1) {
if (element.href !== null) { element = document_element.head.children[i];
// XXX Manage relative URL during extraction of URLs if (element.href !== null) {
// element.href returns absolute URL in firefox but "" in chrome; // XXX Manage relative URL during extraction of URLs
if (element.rel === "stylesheet") { // element.href returns absolute URL in firefox but "" in chrome;
settings.required_css_list.push( if (element.rel === "stylesheet") {
renderJS.getAbsoluteURL(element.getAttribute("href"), url) settings.required_css_list.push(
); renderJS.getAbsoluteURL(element.getAttribute("href"), url)
} else if (element.nodeName === "SCRIPT" && );
(element.type === "text/javascript" || } else if (element.nodeName === "SCRIPT" &&
!element.type)) { (element.type === "text/javascript" ||
settings.required_js_list.push( !element.type)) {
renderJS.getAbsoluteURL(element.getAttribute("src"), url) settings.required_js_list.push(
); renderJS.getAbsoluteURL(element.getAttribute("src"), url)
} else if (element.rel === "http://www.renderjs.org/rel/interface") { );
settings.interface_list.push( } else if (element.rel ===
renderJS.getAbsoluteURL(element.getAttribute("href"), url) "http://www.renderjs.org/rel/interface") {
); settings.interface_list.push(
renderJS.getAbsoluteURL(element.getAttribute("href"), url)
);
}
} }
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment