何时从背景中注入JS的chrome扩展
我有Chrome Extension,并在加载选项卡时将我的应用程序注入网页。
chrome.tabs.onUpdated.addListener((tabId, changeInfo, tab) => {
if (changeInfo.status === 'complete') {
// Inject app
有时,某些页面加载时间非常慢,可以已经加载DOM,但是有些东西会继续加载和加载,所以有更好的时间注入我的应用程序吗? 以及如何检测到它?
I have Chrome extension and I'm injecting my app in to a web pages when the tab is loaded.
chrome.tabs.onUpdated.addListener((tabId, changeInfo, tab) => {
if (changeInfo.status === 'complete') {
// Inject app
And sometimes somepages load time is very slow, DOM can be already loaded but some stuff keeps loading and loading, so is there a BETTER time to inject my app?
And how to detect it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论