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

Commit e73b36c

Browse files
committed
remove loading of stylesheets in templates; not supported by native imports.
1 parent 52e441c commit e73b36c

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

src/HTMLImports.js

-22
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,6 @@ if (!useNative) {
7878
// from the main document, only load imports
7979
// TODO(sjmiles): do this by altering the selector list instead
8080
nodes = this.filterMainDocumentNodes(doc, nodes);
81-
// extra link nodes from templates, filter templates out of the nodes list
82-
nodes = this.extractTemplateNodes(nodes);
8381
return nodes;
8482
},
8583
filterMainDocumentNodes: function(doc, nodes) {
@@ -90,26 +88,6 @@ if (!useNative) {
9088
}
9189
return nodes;
9290
},
93-
extractTemplateNodes: function(nodes) {
94-
var extra = [];
95-
nodes = Array.prototype.filter.call(nodes, function(n) {
96-
if (n.localName === 'template') {
97-
if (n.content) {
98-
var l$ = n.content.querySelectorAll('link[rel=' + STYLE_LINK_TYPE +
99-
']');
100-
if (l$.length) {
101-
extra = extra.concat(Array.prototype.slice.call(l$, 0));
102-
}
103-
}
104-
return false;
105-
}
106-
return true;
107-
});
108-
if (extra.length) {
109-
nodes = nodes.concat(extra);
110-
}
111-
return nodes;
112-
},
11391
loaded: function(url, elt, resource) {
11492
if (isDocumentLink(elt)) {
11593
var doc = importer.documents[url];

0 commit comments

Comments
 (0)