Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify that the load event only depends on eagerly-loaded resources #34688

Merged
merged 1 commit into from
Jul 15, 2024

Conversation

maksverver
Copy link
Contributor

Description

Clarify that the load event only depends on eagerly-loaded resources.

Motivation

Previously, the page could be interpreted to suggest that the load event does not fire until all resources are loaded, including images and iframes with loading="lazy", but that's not the case, as can be verified with a simple example like:

<html>
<body onload="alert(document.getElementById('cat').complete)">
<img id="cat" src="https://cataas.com/cat" loading="lazy">
</body>
</html>

which alerts false when loading="lazy", and true when loading="eager" (the default).

Additional details

Related issues and pull requests

@maksverver maksverver requested a review from a team as a code owner July 7, 2024 20:01
@maksverver maksverver requested review from wbamberg and removed request for a team July 7, 2024 20:01
@github-actions github-actions bot added Content:WebAPI Web API docs size/xs [PR only] 0-5 LoC changed labels Jul 7, 2024
Copy link
Contributor

github-actions bot commented Jul 7, 2024

Preview URLs

@sideshowbarker sideshowbarker merged commit b99888f into mdn:main Jul 15, 2024
7 checks passed
@sideshowbarker
Copy link
Collaborator

Maks, thanks much, and congrats on landing your first docs change here — welcome aboard 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:WebAPI Web API docs size/xs [PR only] 0-5 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants