Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
remove loading of stylesheets in templates; not supported by native i…
Browse files Browse the repository at this point in the history
…mports.
  • Loading branch information
sorvell committed Jan 27, 2014
1 parent 52e441c commit e73b36c
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions src/HTMLImports.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ if (!useNative) {
// from the main document, only load imports
// TODO(sjmiles): do this by altering the selector list instead
nodes = this.filterMainDocumentNodes(doc, nodes);
// extra link nodes from templates, filter templates out of the nodes list
nodes = this.extractTemplateNodes(nodes);
return nodes;
},
filterMainDocumentNodes: function(doc, nodes) {
Expand All @@ -90,26 +88,6 @@ if (!useNative) {
}
return nodes;
},
extractTemplateNodes: function(nodes) {
var extra = [];
nodes = Array.prototype.filter.call(nodes, function(n) {
if (n.localName === 'template') {
if (n.content) {
var l$ = n.content.querySelectorAll('link[rel=' + STYLE_LINK_TYPE +
']');
if (l$.length) {
extra = extra.concat(Array.prototype.slice.call(l$, 0));
}
}
return false;
}
return true;
});
if (extra.length) {
nodes = nodes.concat(extra);
}
return nodes;
},
loaded: function(url, elt, resource) {
if (isDocumentLink(elt)) {
var doc = importer.documents[url];
Expand Down

0 comments on commit e73b36c

Please sign in to comment.