Skip to content

foreground onMessage not triggered on Chrome Extension popup.html #5851

@rockmandash

Description

@rockmandash

[REQUIRED] Describe your environment

  • Operating System version: macOS 12.0.1
  • Browser version: Chrome 96
  • Firebase SDK version: 9.6.1
  • Firebase Product: cloud messaging

[REQUIRED] Describe the problem

These lines ignore all chrome extension, however, popup.html doesn't fit this situation.

It would be great to add something like this: client.url.startsWith('chrome-extension://') && client.url.includes('popup.html')

function hasVisibleClients(clientList: WindowClient[]): boolean {
return clientList.some(
client =>
client.visibilityState === 'visible' &&
// Ignore chrome-extension clients as that matches the background pages of extensions, which
// are always considered visible for some reason.
!client.url.startsWith('chrome-extension://')
);
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions