如何捕获屏幕,然后在新选项卡中将其打开。 chrome扩展程序?

时间:2018-09-01 10:39:47

标签: google-chrome-extension

我想在用户点击扩展按钮时捕获当前选项卡,然后将图像打开到新的水龙头上,以便用户对其进行裁剪和保存。

chrome.browserAction.onClicked.addListener(() => {
   chrome.tabs.captureVisibleTab(null, {}, function (image) {
      // how to pass the image to a new tab
      chrome.tabs.create({url: 'options.html'});
   });
});

0 个答案:

没有答案