0

I'm writing a Chrome extension modifying HTML DOM elements. I want to ask how could I wait for finished loading from websites bundled in webpack?

necroface
  • 2,545
  • 5
  • 34
  • 55

1 Answers1

0

User window.onload

When do window.onload fires?

By default, it is fired when the entire page loads, including its content (images, css, scripts, etc.) In some browsers it now takes over the role of document.onload and fires when the DOM is ready as well.

Example:

window.onload = function() {
  // ..doSomethingElse.. 
};

See this: https://stackoverflow.com/a/588048

elegant-user
  • 2,991
  • 5
  • 21
  • 41