javascript check if document content is loaded code example
Example: if document is loaded
if (document.readyState === 'complete') {
// The page is fully loaded
}
if (document.readyState === 'complete') {
// The page is fully loaded
}