Closed Bug 1624040 Opened 5 years ago Closed 5 years ago

browser.extension.getViews does not return extension pages opened in containers

Categories

(WebExtensions :: General, defect)

75 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: dvalter, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0

Steps to reproduce:

  1. Open moz-extension://extension-id/foo.html in a regular tab
  2. Open moz-extension://extension-id/foo.html in any container
  3. Call browser.extension.getViews({ tabId: tabId }) in the extension code

Actual results:

Only the first tab view is returned

Expected results:

All tab views should be returned

Correction:
get views should be called in loop over all available tab id's

Browser version:
First seen in 72, but likely it's here since Firefox 5x and closely related to 1382652

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Product: Firefox → WebExtensions
Component: Untriaged → General

This is working as intended. extension.getViews() returns DOM windows that can be accessed by the current context. Container tabs are isolated from normal and private browsing windows, so when called from those, the returned list of views won't include extension pages in container tabs.

When you call getViews() from a container tab, you will be able to see other extension tabs in the same container, though.

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.