【发布时间】:2014-10-07 06:32:11
【问题描述】:
chrome.tabs.query({
active: true,
currentWindow: true
},
function (tabs) {
chrome.tabs.captureVisibleTab(null
,{ format: "png"},
function (src) {
$('body').append("<img src='" + src + "'>" + tabs[0].url + "</img>");//appends captured image to the popup.html
}
);
});
此代码将捕获的图像附加到 popup.html 的正文中。但我想要的是将图像附加到弹出主体我想使用 chrome.tabs.create({url:"newtab.html") 打开新选项卡并将捕获的图像附加到这个 newtab.html。 'newtab.html' 已经在路径文件夹中)。
提前致谢
【问题讨论】:
标签: javascript jquery google-chrome google-chrome-extension