This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
loadLinks: function(urls) { | |
// HTMLImports polyfill can load links out of documents, | |
// so make a document and put our links in it | |
var doc = document.createDocumentFragment(); | |
urls.forEach(function(url) { | |
var link = doc.appendChild(document.createElement('link')); | |
link.rel = "import"; | |
link.href = url; | |
}); | |
// ask the polyfill to load the links, do custom parsing |