Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

121
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda