Google Chrome Extension: captureVisibleTab problem -


I'm trying to capture the current view tab but I'm getting undefined. When the extension's icon is pressed, the following code is executing. When the warning is called, I see undefined instead of the URL.

  ChromeBrowser Action .onclicked.addListener (function) {chrome.windows.getCurrent (function) {chrome.tabs.captureVisibleTab (win.id, {"format": "Png"}, function (imgUrl) {warning (imgUrl);});});});   

What should I do to get the URL of the captured image? Someone please help me

Thank you!

I think your code has been taken from the example given on the Chrome extension website and yes, it There is a buggy.

Change the permission attribute inside this manifest.json:

  "Permissions": ["Tab", "& lt; all_urls" ]   

Cheers, David

Comments