##// END OF EJS Templates
Corrected Scope.own() to cleanup the supplied object immediately when the scope is disposed already
Corrected Scope.own() to cleanup the supplied object immediately when the scope is disposed already

File last commit:

r107:e59104632d14 default
r131:c7d9ad82b374 v1.8.1 default
Show More
play.ts
16 lines | 419 B | video/mp2t | TypeScriptLexer
cin
Working on WatchForRendition
r107 import aspect = require("dojo/aspect");
import { Cancellation } from "@implab/core-amd/Cancellation";
export const play = (ani: dojo._base.Animation, ct = Cancellation.none) => {
if (ct.isSupported())
ct.register(() => ani.stop());
return new Promise<void>(resolve => {
aspect.after(ani, "onEnd", x => {
resolve();
return x;
});
ani.play();
});
};