ng2-idle-core
Version:
ng-idle for Angular 2+ core module
51 lines • 2.08 kB
JavaScript
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
import { WindowInterruptSource } from './windowinterruptsource';
/*
* An interrupt source on the storage event of Window.
*/
var /*
* An interrupt source on the storage event of Window.
*/
StorageInterruptSource = /** @class */ (function (_super) {
__extends(StorageInterruptSource, _super);
function StorageInterruptSource(throttleDelay) {
if (throttleDelay === void 0) { throttleDelay = 500; }
return _super.call(this, 'storage', throttleDelay) || this;
}
/*
* Checks to see if the event should be filtered.
* @param event - The original event object.
* @return True if the event should be filtered (don't cause an interrupt); otherwise, false.
*/
/*
* Checks to see if the event should be filtered.
* @param event - The original event object.
* @return True if the event should be filtered (don't cause an interrupt); otherwise, false.
*/
StorageInterruptSource.prototype.filterEvent = /*
* Checks to see if the event should be filtered.
* @param event - The original event object.
* @return True if the event should be filtered (don't cause an interrupt); otherwise, false.
*/
function (event) {
if (event.key.indexOf('ng2Idle.') >= 0 && event.key.indexOf('.expiry') >= 0) {
return false;
}
return true;
};
return StorageInterruptSource;
}(WindowInterruptSource));
/*
* An interrupt source on the storage event of Window.
*/
export { StorageInterruptSource };
//# sourceMappingURL=storageinterruptsource.js.map