通过VUEJS访问浏览器API

发布于 2025-01-26 08:59:40 字数 184 浏览 2 评论 0原文

我想用vue.js制作一个firefox插件,并想从浏览器中使用API​​。例如,使用browser.tabsbrowser.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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

皇甫轩 2025-02-02 08:59:40

and browser。 DNS 是浏览器扩展API的一部分。 Vue 可以用于创建浏览器扩展名,因此,可以使用VUE中使用该API。

例如, vitesse-webext是用于创建交叉的起动模板 - 平台(包括Chrome和Firefox)带有VUE的浏览器扩展。

browser.tabs and browser.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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文