Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在寻找一种尽早将 html(标签)插入到特定位置的网站的方法。插入本身不是问题,我只是在寻找一种无需等待 readyState 完成触发来加快速度的方法。
我知道 GTM(谷歌标签管理器)在加载和完成之间插入标签。它如何以有效的方式做到这一点?
document.readyState === 'interactive' 似乎是最早的事件触发