-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
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
content_scripts "world": "MAIN" 报错 #26
Comments
不知道"world" = "MAIN"是什么,可否描述更清楚一些,比如给出报错的截图,或贴出相关的代码逻辑。 |
{ |
是没有chrome.runtime,说错了 |
感谢您提出的问题,我知道原因了,我提供的插件暂时实现不了这个,短期内还改不了。 |
还没用过这个 |
获取当前的window 环境,我们有个场景是操作某个网站的编辑器,这个编辑器是挂载在window上,必须要 word=main 才能获取到。这时候这个content_scripts是不是就 IIFE 加载就好了 |
这个场景不声明"word": "main", 在content_scripts里面注入一个injected.js应该也能达到目的吧? 如这个例子所示examples/crx-webAccessibleResources/content.js , 先看看是否可行
|
manifest 中 content_scripts 在"world" = "MAIN" 时 没有chrome.runtime对象,引发报错
The text was updated successfully, but these errors were encountered: