Reputation: 25
Hey everyone! I am new in chrome extension developing, and in my extension, I have a pop up window to show something when it's running, and if the window is closed, I want the whole extension to stop running, but some functions in the background.html are still running, so how could I stop all the functions? Thanks!
Upvotes: 0
Views: 607
Reputation: 40159
In your popup,
var bkg = chrome.extension.getBackgroundPage();
bkg.location.reload()
That will stop everything and reload the background page. If you want to control the reloading state, you can have a function in the background page that you call bkg.callSomeFunction()
Upvotes: 2