通过VUEJS访问浏览器API
我想用vue.js制作一个firefox插件,并想从浏览器中使用API。例如,使用browser.tabs
或browser.dns
。但是,当我在组件的脚本部分中使用浏览器时,我会得到'浏览器'的输出未定义
。
是否可以使用VUEJS访问浏览器的API?
I thought to make a firefox addon with Vue.js and wanted to use the API from the browser. For example to use browser.tabs
or browser.dns
. But when I use browser in the script part of a component I get the output that 'browser' is not defined
.
Is it possible to access the API of the browser with vuejs?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
“ and
browser。 DNS
是浏览器扩展API的一部分。 Vue 可以用于创建浏览器扩展名,因此,可以使用VUE中使用该API。例如,
vitesse-webext
是用于创建交叉的起动模板 - 平台(包括Chrome和Firefox)带有VUE的浏览器扩展。
browser.tabs
andbrowser.dns
are part of the Browser Extensions API. And Vue can be used to create browser extensions, so yes, it's possible to use that API from Vue.For example,
vitesse-webext
is a starter template for creating cross-platform (including Chrome and Firefox) browser extensions with Vue.