Last active
August 4, 2021 08:23
-
-
Save lil5/b3ca6c9303b2e359468ea81b8890725d to your computer and use it in GitHub Desktop.
Async function on load
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
async function waitDocumentLoad() { | |
return new Promise<void>((resolve) => | |
window.addEventListener("load", () => resolve()) | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment