Если документ загружен

if (document.readyState === 'complete') {
  // The page is fully loaded
}
Different Dogfish