mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-11-06 22:20:06 +01:00
27 lines
700 B
JavaScript
27 lines
700 B
JavaScript
(function() {
|
|
"use strict";
|
|
|
|
var Timer = function() {
|
|
this.resolution = 1000; // 1 second resolution
|
|
this.containers = {
|
|
|
|
};
|
|
|
|
this.registerContainer = function(container) {
|
|
this.containers[container.attr('container-id')] = container;
|
|
};
|
|
|
|
var tick = function() {
|
|
for(var container in this.containers) {
|
|
var el = this.containers[container];
|
|
// document does not exist anymore
|
|
if(!jQuery.contains(document.documentElement, el[0])) {
|
|
delete this.containers[container];
|
|
continue;
|
|
}
|
|
}
|
|
};
|
|
|
|
};
|
|
|
|
})(); |