Skip to content

Mistakes in "Page lifecycle: DOMContentLoaded, load, beforeunload, unload" #513

@csr632

Description

@csr632

In https://javascript.info/onload-ondomcontentloaded :

  1. "All scripts are executed except those that are external with async or defer" is wrong, and is inconsistent with a sentence before: "Scripts with defer execute after the document is loaded and parsed (they wait if needed), right before DOMContentLoaded." Maybe a typo?
  2. The result of plunker demo is inconsistent with your prediction: readyState:complete is output after img onload(in Chrome 69 and Firefox 62). Maybe the browsers have changed sence you wrote this page?
[1844] initial readyState:loading
[1978] readyState:interactive
[1978] DOMContentLoaded
[2592] iframe onload
[8416] img onload
[8416] readyState:complete
[8416] window onload

Thank you for the greate tutorial!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions