Use chrome.tabs.create (object properties, function callback) as described in http://code.google.com/chrome/extensions/tabs.html
Object properties may contain fields for windowId, index, url, and selected. The optional callback function gets the Tab object of the newly created tab.
So, the simplest example of creating a new tab in the current window and selecting it will look like this:
chrome.tabs.create({'url': chrome.extension.getURL('popup.html'), 'highlighted': 'true'});
Not sure why you want to show popup.html in a new tab, but I find it very useful when developing / debugging my extension ... It's pretty painful that there is “usually” on the extension page, just a link to the help page.
I would like to know how to open it in a new window and, possibly, in kiosk mode; -)
Draško Kokić Mar 25 '10 at 16:27 2010-03-25 16:27
source share