We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
默认情况下:脚本的下载和执行是按照文档顺序同步进行的,脚本下载和执行时,会阻塞文档的解析;当脚本下载和执行完毕时才会继续文档解析;
当script标签中有async,脚本加载和文档加载异步执行的,当脚本下载完会停止html解析,执行脚本,等脚本执行完再继续html解析;
当script标签中有defer,脚本加载和文档加载异步执行的,当文档解析完毕后触发DOMContentLoaded 事件前执行;
The text was updated successfully, but these errors were encountered:
No branches or pull requests
async
当script标签中有async,脚本加载和文档加载异步执行的,当脚本下载完会停止html解析,执行脚本,等脚本执行完再继续html解析;
defer
当script标签中有defer,脚本加载和文档加载异步执行的,当文档解析完毕后触发DOMContentLoaded 事件前执行;
The text was updated successfully, but these errors were encountered: