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

Commit

Permalink
remove processing of templates entirely; ensure main document nodes a…
Browse files Browse the repository at this point in the history
…re properly filtered under SD polyfill.
  • Loading branch information
sorvell committed Jan 27, 2014
1 parent e73b36c commit 894b784
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/HTMLImports.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,15 @@ if (!useNative) {

var importLoader;
var STYLE_LINK_TYPE = 'stylesheet';
// TODO(sorvell): SD polyfill intrusion
var mainDoc = window.ShadowDOMPolyfill ?
window.ShadowDOMPolyfill.wrapIfNeeded(document) : document;

var importer = {
documents: {},
cache: {},
preloadSelectors: [
'link[rel=' + IMPORT_LINK_TYPE + ']',
'template',
'script[src]:not([type])',
'script[src][type="text/javascript"]'
].join(','),
Expand Down Expand Up @@ -81,7 +83,7 @@ if (!useNative) {
return nodes;
},
filterMainDocumentNodes: function(doc, nodes) {
if (doc === document) {
if (doc === mainDoc) {
nodes = Array.prototype.filter.call(nodes, function(n) {
return !isScript(n);
});
Expand Down

0 comments on commit 894b784

Please sign in to comment.