Commit e1684874 authored by Romain Courteaud's avatar Romain Courteaud

IE does not create an empty head element.

parent d390615d
...@@ -905,6 +905,7 @@ ...@@ -905,6 +905,7 @@
if (document_element.nodeType === 9) { if (document_element.nodeType === 9) {
settings.title = document_element.title; settings.title = document_element.title;
if (document_element.head !== null) {
for (i = 0; i < document_element.head.children.length; i += 1) { for (i = 0; i < document_element.head.children.length; i += 1) {
element = document_element.head.children[i]; element = document_element.head.children[i];
if (element.href !== null) { if (element.href !== null) {
...@@ -920,13 +921,15 @@ ...@@ -920,13 +921,15 @@
settings.required_js_list.push( settings.required_js_list.push(
renderJS.getAbsoluteURL(element.getAttribute("src"), url) renderJS.getAbsoluteURL(element.getAttribute("src"), url)
); );
} else if (element.rel === "http://www.renderjs.org/rel/interface") { } else if (element.rel ===
"http://www.renderjs.org/rel/interface") {
settings.interface_list.push( settings.interface_list.push(
renderJS.getAbsoluteURL(element.getAttribute("href"), url) renderJS.getAbsoluteURL(element.getAttribute("href"), url)
); );
} }
} }
} }
}
} else { } else {
throw new Error("The first parameter should be an HTMLDocument"); throw new Error("The first parameter should be an HTMLDocument");
} }
......
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