Web extension is running in Firefox or in Fennec?

Martin Giger martin at humanoids.be
Fri Oct 13 15:58:13 UTC 2017


Hi Brent

You could use both runtime.getBrowserInfo() to get the name of the
current browser, which I'd hope is different on Android (haven't tried
that myself) or runtime.getPlatformInfo() to check if you're running on
Android.

Martin


On 13.10.2017 17:37, Brent Montrose wrote:
> Hello
>
> What is the best or recommend way to determine if a web extension is
> running in desktop Firefox or in the Fennec (Android version of
> Firefox)?  Is inspecting the user agent the best approach?  
>
> Thanks
>
>
> _______________________________________________
> Dev-addons mailing list
> Dev-addons at mozilla.org
> https://mail.mozilla.org/listinfo/dev-addons

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/dev-addons/attachments/20171013/5169da5f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://mail.mozilla.org/pipermail/dev-addons/attachments/20171013/5169da5f/attachment.sig>


More information about the Dev-addons mailing list