Skip to content

Instantly share code, notes, and snippets.

View AGoblinKing's full-sized avatar
🐢
INFRASTRUCTURE

a Goblin King AGoblinKing

🐢
INFRASTRUCTURE
View GitHub Profile
anonymous
anonymous / gist:7259330
Created November 1, 2013 00:21
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