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

Registering a new devtools panel causes infinite panels opened, only at firefox. #83

Open
ghost opened this issue May 2, 2020 · 1 comment

Comments

@ghost
Copy link

ghost commented May 2, 2020

Bug Description
Registering a new devtools panel causes infinite panels opened, only at firefox.

Every time i click "panel" it opens another instance of "panel".

firefox devtools

To Reproduce

  • vue create extension
  • vue add browser-extension
  • at Which browser extension components do you wish to generate? mark Dev Tools Tab
  • add this code to src/devtools/main.js:
chrome.devtools.panels.create('panel', '', 'devtools.html', function (panel) {
  console.log('hello from callback')
})
  • npm run serve
  • open firefox on macOS and load unpacked
  • press F12

Expected behavior
As happens in chrome, a panel should only be added once.

Name Version
vue-cli-plugin-browser-extension 0.24.0
Operating System MacOS Mojave
Node v13.12.0
NPM/Yarn 6.14.4
vue-cli 4.0.5
browser Chrome, latest
@MCFreddie777
Copy link

MCFreddie777 commented Aug 16, 2021

I think this is correct behaviour. The devtools.html is added when the devtools are open and already contains dynamically injected script main.js. This script then creates new panel from devtools.html. Therefore you got into loop (dynamically loaded script creates new panel from itself).

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