How to use Geolocation with Service Workers in Manifest v3

120 views
Skip to first unread message

Matthew Podolak

unread,
Apr 6, 2021, 9:22:44 AM4/6/21
to Chromium Extensions
There appears to be no practical way of using geolocation with manifest v3.

I'm open to any suggestions on how I should be incorporating this. I make an API request from the service worker based on page info passed from the content script.

Asking for location from the content script will require permission for every web page which creates a terrible UX. Adding location request to popup will require the user to wait for an API request which should be occurring in the background, thus once again creating a bad UX.

Is my only option to use Manifest v2?

Jackie Han

unread,
Apr 6, 2021, 9:41:21 AM4/6/21
to Matthew Podolak, Chromium Extensions
I don't know what is the function of your extension. Only in my personal opinion, desktop computers usually cannot provide accurate geo location information very well. If it is to display the weather info, consider letting the user enter the location.

--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/61fdf0e9-8666-44fd-8454-1e8b6c285d7bn%40chromium.org.
Reply all
Reply to author
Forward
0 new messages