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

Accessing and responding to the open/close state of a sidePanel #998

Open
JeroenvdV opened this issue Aug 23, 2023 · 0 comments
Open

Accessing and responding to the open/close state of a sidePanel #998

JeroenvdV opened this issue Aug 23, 2023 · 0 comments

Comments

@JeroenvdV
Copy link

JeroenvdV commented Aug 23, 2023

Is there a way to retrieve the state of the extension's sidePanel: whether it is currently open or closed (in a certain tab)? Additionally, is there a way to listen to the event that this state changes?

Imagine I want to enable some functionality of a content script only when the sidePanel of the same extension is visible. Let's say showing the sidePanel makes the page's background color red, and closing the sidePanel reverts it back to normal.

I could send a message from the sidePanel's html page to the service worker, which will hopefully indicate that it has opened, but I don't know how I can respond to the user closing the sidePanel.

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

No branches or pull requests

1 participant