Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

120
Visualizações
Async requirements and composeAction.openPopup handler

I would like to develop an Thunderbird extension which scans the recipient list and opens under some conditions are popup.

Unfortunately, the address book API is mostly async, so resolving the recipient list is also async code.

After calling this async API, my handler unfortunately losses the input handler attribute and I cannot call anymore composeAction.openPopup:

Error: composeAction.openPopup may only be called from a user input handler

Is there are workaround? Looking at other extensions, they all use browser.windows.create which seems to callable outside input handlers...

Here the relevant parts of my code:

browser.compose.onBeforeSend.addListener(async (tab, details) => {
   
   const canBeSent = await checkMail();
   if (canBeSent) {
      return Promise.resolve();
   }

   browser.composeAction.openPopup(); // does not work because of async

   // further code
} 
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda