Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

125
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!