1 | var InterruptManager = (function () {
|
2 | function InterruptManager(options) {
|
3 | this.options = options;
|
4 | this._prevented = false;
|
5 | }
|
6 | InterruptManager.prototype.isInterrupting = function () {
|
7 |
|
8 | return this.options.interruptable || this._prevented;
|
9 | };
|
10 | InterruptManager.prototype.isInterrupted = function () {
|
11 | return !this.options.interruptable && this._prevented;
|
12 | };
|
13 | InterruptManager.prototype.setInterrupt = function (prevented) {
|
14 | !this.options.interruptable && (this._prevented = prevented);
|
15 | };
|
16 | return InterruptManager;
|
17 | }());
|
18 | export { InterruptManager };
|
19 |
|
\ | No newline at end of file |