Created
July 30, 2019 15:07
-
-
Save tomfuertes/81584eed48017b191d78634cfaa4e1e9 to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/vahocedapo
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script> | |
window.start = new Date(); | |
function log(str){ | |
return ()=>{ | |
console.log(str, document.readyState, new Date() - start); | |
if (document.readyState === 'interactive') { | |
console.log(document.getElementById('foo').style); | |
} | |
} | |
} | |
document.addEventListener('readystatechange', log('rsc')); | |
window.addEventListener('load', log('load')); | |
log('top')(); | |
</script> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> | |
</head> | |
<body> | |
<h1 id="foo">foo</h1> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment