Last active
October 9, 2018 02:51
-
-
Save Zizzamia/a527be75e330c50f8498407ad9d221b1 to your computer and use it in GitHub Desktop.
Perfume FCP demo
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
<head> | |
<script src="perfume.js"></script> | |
<style>body { background: #f2db77; ... }</style> | |
</head> | |
<body></body> | |
<script> | |
const perfume = new Perfume({ | |
firstPaint: true, | |
firstContentfulPaint: true, | |
}); | |
setTimeout(() => { | |
const elH1 = document.createElement('H1'); | |
elH1.textContent = 'First (Contentful) Paint'; | |
document.body.append(elH1); | |
}, 600); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment