chrome 拡張で画面をキャプチャする

使い方は簡単で、

chrome.tabs.captureVisibleTab(null,{format:"png"},function(string){})

とするだけなのだが
何故か以下のエラーが発生

tabs.captureVisibleTab: The 'activeTab' permission is not in effect because this extension has not been in invoked.

ぐぐる

  • mainifest.jsonのパーミッションが必要らしい
"permissions": [
    "<all_urls>"
]