load

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

General info

Спецификация

DOM L3

Интерфейс

UIEvent

Всплывает

Да

Отменяемое

Нет

Цель

Window

Default Action

Нет.

Свойства

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.

Пример

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

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