Created
December 2, 2024 07:41
-
-
Save dimasmds/8db69a3584fc89a5e0e8ead01a904b3d to your computer and use it in GitHub Desktop.
web intermediate code suggestion - 1 (improve initial script load)
This file contains hidden or 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
| import App from './app.js'; | |
| document.addEventListener('DOMContentLoaded', async () => { | |
| const content = document.querySelector('#content'); | |
| const app = new App({ content }); | |
| await app.renderPage(); | |
| window.addEventListener('hashchange', async () => { | |
| await app.renderPage(); | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment