0

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.

Kurt
  • 678
  • 1
  • 7
  • 24
  • Does this answer your question? [How to access the webpage DOM rather than the extension page DOM?](https://stackoverflow.com/questions/4532236/how-to-access-the-webpage-dom-rather-than-the-extension-page-dom) – wOxxOm Oct 25 '22 at 21:07
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Oct 26 '22 at 08:40

0 Answers0