load

Событие load происходит когда ресурс и его зависимые ресурсы закончили загружаться.

General info

Свойства

Property Type Description
target Только для чтения EventTarget The event target (the topmost target in the DOM tree).
type Только для чтения DOMString The type of event.
bubbles Только для чтения Boolean (en-US) Whether the event normally bubbles or not.
cancelable Только для чтения Boolean (en-US) Whether the event is cancellable or not.
view Только для чтения WindowProxy document.defaultView (window of the document)
detail Только для чтения long (float) 0.

Пример

html
<script>
  window.addEventListener("load", function (event) {
    console.log("All resources finished loading!");
  });
</script>

Связанные события