manager: add purge method (delete all)

This commit is contained in:
jean-emmanuel 2016-12-08 06:10:49 +01:00
parent 9422f0f9e3
commit 7eef10c5ce

View file

@ -100,6 +100,17 @@ WidgetManager.prototype.removeWidget = function(hash) {
if (address && this.addressRoute[address][h2]) delete this.addressRoute[address][h2]
}
WidgetManager.prototype.purge = function() {
this.widgets = {}
this.addressRoute = {}
this.idRoute = {}
this.linkIdRoute = {}
}
WidgetManager.prototype.getWidgetBy = function(key, dict) {
var w = [],