Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
HTML Imports Resource Timing performance
// Know how fast your HTML Imports are.
// - doesn't show sub-import resources.
var imports = document.querySelectorAll('link[rel="import"]');
[], function(link) {
var entries = performance.getEntriesByName(link.href);'=== HTML Imports perf ===');
entries.forEach(function(e) {
console.log(, 'took', e.duration, 'ms');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment