mirror of https://github.com/sveltejs/svelte
parent
373f0ef389
commit
f970b61c5a
@ -1,14 +1,14 @@
|
|||||||
<script>
|
<script>
|
||||||
let it = gen();
|
const it = gen();
|
||||||
it.next();
|
it.next();
|
||||||
|
|
||||||
setTimeout(() => {
|
|
||||||
it.next();
|
|
||||||
}, 20)
|
|
||||||
|
|
||||||
function* gen() {
|
setTimeout(() => {
|
||||||
while (true) {
|
it.next();
|
||||||
yield;
|
}, 20)
|
||||||
}
|
|
||||||
}
|
function* gen() {
|
||||||
|
while (true) {
|
||||||
|
yield;
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
Loading…
Reference in new issue