5

When you make a Google Chrome Extension you can choose to have a "Default_Popup", is there any way to programmatically open the popup?

2
  • 1
    I think you'll soon be able to assign a keyboard shortcut to do that, but allowing scripts to do so whenever they like would probably be a bad user experience.
    – gengkev
    Oct 13, 2012 at 2:55
  • In some cases I agree, but for what the user has suggested, it works in their favor. Not randomly doing it, it's a setting.
    – Zachrip
    Oct 13, 2012 at 5:51

2 Answers 2

7

There is no direct way to open the popup programmatically. However, if you're looking to open it based on a keyboard shortcut, you can use the commands API with the _execute_browser_action command (the API is currently available on the beta channel only).

1
  • 1
    Thank you, although I never got around to using this, it's a good answer, sorry I took so long to accept. Thanks!
    – Zachrip
    May 15, 2013 at 22:20
2

There is an API, chrome.browserAction.openPopup(function callback), that will hopefully be available soon. Please star this bug: https://code.google.com/p/chromium/issues/detail?id=436489

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.