1

I am trying to access the content of a tab. But most of the time it gives an error. Has the code ever worked?

list of tabs:

messenger.tabs.query(
  {
    active: false ,
    currentWindow: true
  }
).then( (tabs) => { console.log (tabs); })

then:

messenger.messageDisplay.getDisplayedMessage(4).then ((msn) => {
 console.log(msn);
});

enter image description here but 99% msn is null.

Please see the attach files

thanks!!!!

enter image description here

carmel
  • 902
  • 7
  • 24
  • well... i am learning... the tabs must be displayed.... but ... how can change the tab focus for displayed another tab??? thanks – RAFAEL ANGEL OSUNA JIMENEZ Jun 11 '20 at 08:32
  • There seems to be a `browser.tabs.update()` function, taking an `updateProperties` with an `active` flag as an argument. Did you try that? See [documentation](https://thunderbird-webextensions.readthedocs.io/en/78/tabs.html#update-tabid-updateproperties). – Qeole Sep 17 '20 at 22:13

0 Answers0