简体   繁体   English

“浏览器”的区别。 和“信使”。 使用 webextension/javascript API 时

[英]Difference of the "Browser." and "Messenger." when using a webextension/javascript API

Good day, I am new to using webextension and javascript apis.美好的一天,我是使用 webextension 和 javascript apis 的新手。 Just wondering what is the difference of using messsenger.(API) and Browser.(API)只是想知道使用 messenger.(API) 和 Browser.(API) 有什么区别

I'm not 100% sure, but my understanding is that the following: Both browser and messenger are namespaces that can be used to call WebExtension API in Thunderbird.我不是 100% 确定,但我的理解是: browsermessenger都是可用于在 Thunderbird 中调用 WebExtension API 的命名空间。 I suppose that browser exists because it was inherited from Firefox, from which Thunderbird gets some of the code for WebExtensions (they have many APIs in common).我想browser存在是因为它继承自 Firefox,Thunderbird 从中获取了一些 WebExtensions 的代码(它们有许多共同的 API)。 But Thunderbird is not meant to be a browser, above all it's an email client.但 Thunderbird 并不是一个浏览器,最重要的是它是一个电子邮件客户端。 So I suppose the messenger namespace was added to reflect that.所以我想添加了messenger命名空间来反映这一点。

This seems to be corroborated by the documentation for the MailExtensions API MailExtensions API文档似乎证实了这一点

In Thunderbird, all WebExtension API can be accessed through the browser.* namespace, as with Firefox, but also through the messenger.* namespace, which is a better fit for Thunderbird.在 Thunderbird 中,所有 WebExtension API 都可以通过browser.*命名空间访问,与 Firefox 一样,但也可以通过更适合 Thunderbird 的messenger.*命名空间访问。

I would see it pretty much as the same thing as WebExtensions being called indifferently WebExtensions or MailExtensions for Thunderbird.我认为它与WebExtensions被无差别地称为 Thunderbird 的WebExtensionsMailExtensions几乎相同。

Assuming my hypothesis is correct, there should be no practical difference in using one over the other.假设我的假设是正确的,使用一个和另一个应该没有实际区别。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 浏览器中的Javascript下载文件。 网络API - Javascript download document in browser. Web API 用于浏览器的Google API密钥。 引荐来源网址设置时出现的问题 - Google API Key for browser. Issue when referrers set Messenger API:旁路信使浏览器 - Messenger API : bypass messenger browser Javascript 浏览器 WebExtension API - 获取活动选项卡的所有标题和其他参数 - Javascript Browser WebExtension API - Get all headers and other parameters of the active tab Javascript检测浏览器。 表达式不起作用 - Javascript detecting browser. Expressions not working Javascript,基于浏览器显示图像。 - Javascript, Display image based on browser. 将 webAudio API 与 javascript 用于浏览器时出现故障 - Glitches when using webAudio API with javascript for browser Javascript如何在单击时自动更改单词而无需刷新浏览器。 - Javascript How to automatically change word when click without need to refresh browser.? ReactIntl​​仅在刷新浏览器时起作用。 - ReactIntl work only when refreshing browser. 当我使用 Excel JavaScript API 构建加载项时,Microsoft.Office.WebExtension 不起作用 - Microsoft.Office.WebExtension not working when I use the Excel JavaScript API to build an add-in
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM