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

124
Views
execute javascript method calls in the background in chrome extension content script

Imagine a javascript class called MealAdvisor that keeps track of available ingredients and equipment and calculates the best possible meal that can be made with the available resources. It has methods that can be called like:

  • advisor.addSupply('egg', 12) // found some in the fowl-run
  • advisor.removeSupply('loaf', 2) // threw away some old stuff
  • advisor.removeEquipment('microwave oven', 1) // it broke

Suppose that it can sometimes take time to execute the method calls of the advisor. Instead of freezing the user interface, the calls should be queued and executed in order in the background while the user interface shows some waiting indicator and new calls can be added to the queue. Whenever the advisor has caught up and the queue is empty, it should tell the user interface so that it can show a result.

Which is the best way to modify MealAdvisor to support this? It should be usable in a content script that is added to a particular website using a chrome extension.

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!