This file contains 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
(function getDOMElements() { | |
'use strict'; | |
const elements = document.getElementsByTagName('*'); | |
const len = elements.length; | |
console.log(`Number of DOM elements: ${len}`); | |
if (len > 500) { | |
console.log('Skipping listing each element since they might hang the browser...'); |
This file contains 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
(function() { | |
'use strict'; | |
var files = ['assets/site/css/non-critical.css', 'assets/site/img/icons.svg']; | |
function getExtension(src) { | |
return src.split('.').pop(); | |
} | |
function onEvent(el, event, callback) { |