Reputation: 175
I have some operations (basically create new folders and links), which can take several minutes. Now the problem is that in this time chrome does somehow block such that i barely can use the browser (in the "check popup-mode"), which is bad. In addition my spinner gif does not spin. ^^
Besides that the operation is aborted if I click on another tab or so (which closes the extension) in the normal mode, which is also bad.
Does anyone have some ideas to handle these cases?
Upvotes: 2
Views: 1261
Reputation: 10080
You'll do the long-running tasks in a background page. To notify the background page from the popup when to start the task, you can use message passing. Since the background page is always open, it will not stop running when you navigate away from the popup.
Upvotes: 3