load

O evento de load é acionado quando um recurso e seus recursos
dependentes terminaram de carregar.

Informações Gerais

Propriedades

Property Type Description
target Somente leitura EventTarget The event target (the topmost target in the DOM tree).
type Somente leitura DOMString The type of event.
bubbles Somente leitura Boolean (en-US) Whether the event normally bubbles or not.
cancelable Somente leitura Boolean (en-US) Whether the event is cancellable or not.
view Somente leitura WindowProxy document.defaultView (window of the document)
detail Somente leitura long (float) 0.

Exemplo

html
<script>
  window.addEventListener("load", function (event) {
    console.log("Todos os recursos terminaram o carregamento!");
  });
</script>

Eventos Relacionados