Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update files/en-us/web/api/window/load_event/index.md
Co-authored-by: Brian Smith <[email protected]>
  • Loading branch information
Josh-Cena and bsmth authored Sep 11, 2025
commit 014e0e8137f1f64bb32639a3e71837dbbed110e7
2 changes: 1 addition & 1 deletion files/en-us/web/api/window/load_event/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ This event is not cancelable and does not bubble.
> [!NOTE]
> The `load` event that is dispatched when the main document has loaded _is_ dispatched on the `window`, but has two mutated properties: `target` is `document`, and `path` is `undefined`. These two properties are mutated due to legacy conformance.

Usually, to avoid running a script before the DOM it manipulates has been fully constructed, you can simply place the script at the end of the document body, immediately before the closing `</body>` tag, without wrapping it in an event listener. Use this event only to wait for external resources, such as images, to load.
To avoid running a script before the DOM it manipulates has been fully constructed, you can place the script at the end of the document body, immediately before the closing `</body>` tag, without wrapping it in an event listener. You should usually only use the `load` event to wait for external resources, such as images or deferred scripts, to load.

## Syntax

Expand Down