1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-16 16:53:20 -05:00
denoland-deno/cli/tests/058_tasks_microtasks_close.ts
Kevin (Kun) "Kassimo" Qian 5d7bcf86fd
feat: window.close() (#4474)
2020-03-24 23:56:40 -04:00

18 lines
383 B
TypeScript

console.log("sync 1");
setTimeout(() => {
console.log("setTimeout 1");
Promise.resolve().then(() => {
console.log("Promise resolve in setTimeout 1");
});
});
Promise.resolve().then(() => {
console.log("promise 1");
});
window.close();
console.log("sync 2");
setTimeout(() => {
console.log("setTimeout 2");
});
setTimeout(() => {
console.log("setTimeout 3");
}, 100);