文章目录
  1. 1. Defined
  2. 2. Main()
    1. 2.1. 什么是parse(解析)
    2. 2.2. href VS src
    3. 2.3. interactive VS onDOMContentLoaded
  3. 3. Reference

Defined

整理gist的时候发现有这个问题, 发现内容还蛮丰富的, 顺便承接上文关于浏览器加载

Main()

什么是parse(解析)

What parsing the page [email protected]
In this context, is means converting the HTML source code into DOM nodes like elements and text.
Fetching of dependent resources will also continue, but that’s in addition to the parsing.

href VS src

该点用于解释script位置的问题.

interactive VS onDOMContentLoaded

规范在这: w3

中文解释如下: 简要概括, 一些内容已经删减!

  • 一旦document停止解析(stop parsing), 则必须执行以下步骤:
  1. document.readyState 改成interactive;
  2. 页面开始run script in list of scripts, 通俗的理解, script标签;
    3.

Reference

Difference between SRC and HREF

文章目录
  1. 1. Defined
  2. 2. Main()
    1. 2.1. 什么是parse(解析)
    2. 2.2. href VS src
    3. 2.3. interactive VS onDOMContentLoaded
  3. 3. Reference