Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rockmandash opened this issue Jan 3, 2022 · 1 comment
Open

Comments

@rockmandash
Copy link

rockmandash commented Jan 3, 2022

[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://')
);
}

@google-oss-bot
Copy link
Contributor

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants