KangoExtensions / kango

Kango framework issue tracker
74 stars 7 forks source link

kango.ui.optionsPage.open() requires "tabs" permission on Chrome when it doesn't need to #147

Closed thekevinbrown closed 8 years ago

thekevinbrown commented 8 years ago

Hi guys,

Our extension doesn't require the "tabs" permission because we don't need any of that advanced stuff. I noticed without this permission kango.ui.optionsPage.open() seems to fail silently on Chrome.

I tested, and chrome.runtime.openOptionsPage() works fine without the tabs permission, so I'm currently using this code:

if (kango.browser.getName() == 'chrome') {
  chrome.runtime.openOptionsPage();
} else {
  kango.ui.optionsPage.open();
}

I think kango.ui.optionsPage.open should simply translate to a call to chrome.runtime.openOptionsPage on Chrome.

akrylysov commented 8 years ago

It's not possible to implement kango.ui.optionsPage.open using chrome.runtime.openOptionsPage because kango.ui.optionsPage.open accepts hash argument.

thekevinbrown commented 8 years ago

In that case could you mention the required permission on the documentation here:

http://kangoextensions.com/docs/api-reference/kango-ui-optionsPage.html

It was really confusing that it just silently failed once the pages permission was gone.