Skip to content

Instantly share code, notes, and snippets.

@garlicnation
Created August 4, 2016 16:21
Show Gist options
  • Save garlicnation/404f3405d0c8ca0a6a93e3242665fb96 to your computer and use it in GitHub Desktop.
Save garlicnation/404f3405d0c8ca0a6a93e3242665fb96 to your computer and use it in GitHub Desktop.
while(htmlImportRemaining()) {
// Get the first inlinable HTML import
let nextImport = getNextImport();
// Resolve the paths relative to the current document URL
let resolvedImport = resolvePaths(
thisDocument,
nextImport.href,
nextImport.document
)
// Replace <link rel="import"> with the document's DOM
dom5.replace(nextImport, resolvedImport)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment