Programatically open popup

3,914 views
Skip to first unread message

tm8747a

unread,
Sep 28, 2010, 10:25:52 PM9/28/10
to Chromium-extensions
Hi, I was wondering if it was possible to programatically open the
popup for an extension, meaning I want it to open in the bubble as
opposed to actually opening a separate window. Basically, my extension
has the popup specified in the manifest, but I'm adding a keyboard
shortcut and was trying to get it to open up the same way as if you
clicked on the icon, but it doesn't work. I tried the following code:

chrome.windows.create({ url:'/popup.html', type:'popup' });

I thought setting type to "popup" would do it, but then I realized it
just mean that it didn't add a tab to the window. So is there another
way to do this, or is it not currently possible?

Thanks,

-TM

pdknsk

unread,
Sep 29, 2010, 2:49:20 AM9/29/10
to Chromium-extensions
It's not possible.

HappyFunBall

unread,
Sep 30, 2010, 12:03:42 AM9/30/10
to Chromium-extensions
I'm interested in this too.

I'd actually like to prevent the popup from disappearing when the
mouse is clicked on the webpage behind the popup.

And if it closes, I need to reopen it depending on what was clicked.


HappyFunBall

unread,
Sep 30, 2010, 12:11:45 AM9/30/10
to Chromium-extensions
^^^

Keeping the popup open despite clicks on the page behind it seems
possible because "Inspect Popup" keeps it open when debugging ...

Arne Roomann-Kurrik

unread,
Oct 4, 2010, 12:12:19 AM10/4/10
to HappyFunBall, Chromium-extensions
Both opening (http://crbug.com/30491) and pinning (http://crbug.com/30688) popups have been requested in the past and marked as WontFix.  If this is really the use case you need to support, consider moving the user interface of your extension into a window or the upcoming infobar (http://code.google.com/chrome/extensions/trunk/experimental.infobars.html) or sidebar (http://code.google.com/chrome/extensions/trunk/experimental.sidebar.html) APIs.

If neither of these will work, please let us know what your use case is - more information about how people want to build their extensions could help these issues be reconsidered in the future.

~Arne



--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To post to this group, send email to chromium-...@chromium.org.
To unsubscribe from this group, send email to chromium-extens...@chromium.org.
For more options, visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/?hl=en.


tm8747a

unread,
Oct 15, 2010, 7:08:58 PM10/15/10
to Chromium-extensions
Thanks for the replies. I wasn't aware of those experimental APIs,
I'll look into them. I think the sidebar is an interesting option. As
for now, I did implement it as a separate window and that's OK, just
didn't really see why it would be such a big deal to add the
possibility of doing it with the popup bubble. But it's not really a
big deal for what I'm doing.

On Oct 4, 12:12 am, Arne Roomann-Kurrik <kur...@chromium.org> wrote:
> Both opening (http://crbug.com/30491) and pinning (http://crbug.com/30688)
> popups have been requested in the past and marked as WontFix.  If this is
> really the use case you need to support, consider moving the user interface
> of your extension into a window or the upcoming infobar (http://code.google.com/chrome/extensions/trunk/experimental.infobars....)
> or sidebar (http://code.google.com/chrome/extensions/trunk/experimental.sidebar.html)
> APIs.
>
> If neither of these will work, please let us know what your use case is -
> more information about how people want to build their extensions could help
> these issues be reconsidered in the future.
>
> ~Arne
>
>
>
> On Thu, Sep 30, 2010 at 12:11 PM, HappyFunBall <btab...@gmail.com> wrote:
> > ^^^
>
> > Keeping the popup open despite clicks on the page behind it seems
> > possible because "Inspect Popup" keeps it open when debugging ...
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Chromium-extensions" group.
> > To post to this group, send email to chromium-extensi...@chromium.org.
> > To unsubscribe from this group, send email to
> > chromium-extensions+unsubscr...@chromium.org<chromium-extensions%2Bunsubscr...@chromium.org>
> > .
Reply all
Reply to author
Forward
0 new messages