javascript-tutorial / javascript-tutorial/en.javascript.info
some description not accurate in the article of 《onload-ondomcontentloaded》
まだ誰も着手していません。
- 主要言語
- HTML
- スター
- 25.5k
- フォーク
- 4k
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
article
article Link 《onload-ondomcontentloaded》
may not accurate
document.readyState becomes interactive right before DOMContentLoaded. These two things actually mean the same.
interactive – the document is parsed, happens at about the same time as DOMContentLoaded, but before it.
reason
if a page containers some "defer" script, then it will cost some time to execute the "defer" script after interactive but before DCL.
Reference
https://calendar.perfplanet.com/2012/deciphering-the-critical-rendering-path/
If you add a script and tag it with “defer”, then you unblock the construction of the DOM: the document interactive state does not have to wait for execution of JavaScript. However, note that this same script will be executed before DCL is fired. Further, recall that JavaScript may query CSSOM, which means that the DCL event may be held until the CSSOM is ready, at which point the script will be executed. In short: we’ve unblocked the “document interactive” state, but we’re still potentially blocking DCL.
https://html.spec.whatwg.org/multipage/dom.html#current-document-readiness
The DOMContentLoaded event fires after the transition to "interactive" but before the transition to "complete", at the point where all subresources apart from async script elements have loaded.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
リンク先の onload-ondomcontentloaded の記事を開き、引用されている readyState と DOMContentLoaded の説明を、WHATWG の readiness リファレンスおよび defer スクリプトの説明と比較してください。記事を更新し、interactive への遷移と、その後に発生する DOMContentLoaded イベントを区別するようにしてから、これらのリファレンスに照らして改訂した文言を確認してください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript
- 領域
- documentation
- issue の種類
- ドキュメント
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 48/100