WebExtension API support for web app windows

Firefox 143 introduces the ability to launch a website as a web app that is pinned to the Windows taskbar. From the Firefox release notes: “These are sites that you can pin and run as simplified windows directly from the taskbar without losing access to your installed add-ons.”

Are there plans to add a WebExtension API that allows extension developers to open a URL in a web app window?

I’d also like for the browser.windows API to be able to distinguish between normal browser windows and the simplified web app windows. I’ve inspected the data returned from browser.windows.getAll(), and while it returns the open web app windows, there’s no way (that I could find) to detect if they are web app windows. It would also be useful to be able to filter by web app windows when calling browser.windows.getAll(), perhaps by passing in a specific value in the windowTypes array parameter to indicate web app windows.

1 Like

Hey @aecreations!

I haven’t manually verified this myself as I have limited access to Windows at the moment, but I chatted with one of the WebExtensions engineers earlier today and it sounds like Taskbar Tabs are currently exposed as standard windows and tabs. As such, it should be possible possible for an extension to open a URL in a Taskbar Tab window.

As you noted, though, Taskbar Tabs are not identified as such by WebExtensions APIs. A new windowTypes enum value feels like a good addition, but it’s too early to say for sure if that will be added.

I looked through bugzilla.mozilla.org and couldn’t find any issues that focused on exposing Taskbar Tabs to WebExtensions. I think it would be best if you open a feature request. Please include a description of your use case, as this feedback helps us better understand what developers are trying to accomplish and why.

2 Likes

I brought up this exact issue in a Connect feedback thread.

The WebExtensions windows API needs to at least help us distinguish PWAs from other browser windows.

From Chrome’s documentation https://developer.chrome.com/docs/extensions/reference/api/windows#type-WindowType:

“app”
Deprecated in this API. A Chrome App window. Extensions can only see their app own windows.

Seems to suggest that PWA windows should be restricted from extension access in general?

Though I do think an ‘app’ windowType would be the right idea…