mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-21 07:07:58 +01:00
Tie storage observers to a weak reference of window so they're automatically destroyed.
This commit is contained in:
@@ -320,10 +320,7 @@ function Options() //{{{
|
||||
}
|
||||
|
||||
storage.newMap("options", false);
|
||||
storage.addObserver("options", optionObserver);
|
||||
liberator.registerObserver("shutdown", function () {
|
||||
storage.removeObserver("options", optionObserver);
|
||||
});
|
||||
storage.addObserver("options", optionObserver, window);
|
||||
|
||||
function storePreference(name, value)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user