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

Commit

Permalink
Import using Polymer.import
Browse files Browse the repository at this point in the history
  • Loading branch information
sorvell committed Jan 30, 2014
1 parent 2a54cef commit 7c77242
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions x-designer.html
Original file line number Diff line number Diff line change
Expand Up @@ -122,23 +122,7 @@
}
},
loadLinks: function(urls, callback) {
var doc = document.createDocumentFragment();
urls.forEach(function(url) {
var link = doc.appendChild(document.createElement('link'));
link.rel = "import";
link.href = url;
});
// load-all-links in document method should be factored somewhere
// very similar method used in x-meta
HTMLImports.importer.load(doc, function() {
doc.querySelectorAll('link').array().forEach(
function(link) {
HTMLImports.parser.parse(link.content);
CustomElements.parser.parse(link.content);
}
);
callback && callback();
}.bind(this));
Polymer.import(urls, callback);
},
loadHtml: function(html) {
this.$.canvas.loadHtml(html);
Expand Down

0 comments on commit 7c77242

Please sign in to comment.