I need to get some elements on HTML from each tab in a group tabs on google chrome, i need to access HTML to apply a search like getElementById
or getElementsByTagName
and to get element content.
main();
function main() {
crmTestButton.onclick = () => {
alertTotalBrowsersOpenned();
};
}
function alertTotalBrowsersOpenned() {
chrome.windows.getAll({ populate: true }, listTabsinBrowsers);
}
function listTabsinBrowsers(windows) {
for (var indexWindow in windows) {
console.log('------- window')
var window = windows[indexWindow]
for (var indexTab in window.tabs) {
console.log('------- tab')
var tab = window.tabs[indexTab]
console.log(tab)
}
}
}
That's way, i can't to access on HTML, just some propetys of tab like: id, title ... But i need to get HTML.
Thanks everyone.