I want to achieve this at the same time: When the user clicks on the extension icon, open sidepanel, read the page url and send a network request with the url to the backend.
But the chrome.sidepanel.setPanelBehavior({ openPanelOnActionClick: true }) will cover the chrome.action.onclick's behavior.
If you just click on the extension alone and open the sidepanel you can, but you can't make a network request;
If you just want to make a network request, you can, but you don't open the sidepanel.
I just want both to happen at the same time. What should I do?Click to open panel
Version
Latest
What OS are you seeing the problem on?
MacOSX
What browsers are you seeing the problem on?
Chrome
Relevant log output
When I was able to open the sidepanel network requests would not be sent after onclick, so there was no corresponding log
(OPTIONAL) Contribution
[X] I would like to fix this BUG via a PR
Code of Conduct
[X] I agree to follow this project's Code of Conduct
[X] I checked the current issues for duplicate problems.
What happened?
I want to achieve this at the same time: When the user clicks on the extension icon, open sidepanel, read the page url and send a network request with the url to the backend. But the
chrome.sidepanel.setPanelBehavior({ openPanelOnActionClick: true })
will cover thechrome.action.onclick
's behavior.If you just click on the extension alone and open the sidepanel you can, but you can't make a network request; If you just want to make a network request, you can, but you don't open the sidepanel.
I just want both to happen at the same time. What should I do?Click to open panel
Version
Latest
What OS are you seeing the problem on?
MacOSX
What browsers are you seeing the problem on?
Chrome
Relevant log output
(OPTIONAL) Contribution
Code of Conduct