(handler)
| 20 | |
| 21 | export class Sleep { |
| 22 | static install(handler) { |
| 23 | // this dance allows handlers to be installed both at preload and run time |
| 24 | if (Object.isFrozen(Sleep.prototype.handlers)) |
| 25 | Sleep.prototype.handlers = Array.from(Sleep.prototype.handlers); |
| 26 | Sleep.prototype.handlers.push(handler); |
| 27 | } |
| 28 | |
| 29 | static getPersistentValue(index) @ "xs_get_persistent_value"; |
| 30 | static setPersistentValue(index, value) @ "xs_set_persistent_value"; |
no test coverage detected