just gonna go ahead and merge this as the review comments take up too much space

pull/16762/head
Rich Harris 4 days ago committed by GitHub
parent 894b93e40c
commit aaaf428cce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -3,25 +3,25 @@
import A from './A.svelte'; import A from './A.svelte';
import B from './B.svelte'; import B from './B.svelte';
const { promise: main_promise, resolve: main_resolve } = Promise.withResolvers(); const main = Promise.withResolvers();
const { promise: a_promise, resolve: a_resolve } = Promise.withResolvers(); const a = Promise.withResolvers();
const { promise: b_promise, resolve: b_resolve } = Promise.withResolvers(); const b = Promise.withResolvers();
// regardless of resolution order, title should be the result of B, because it's the last-encountered // regardless of resolution order, title should be the result of B, because it's the last-encountered
tick().then(() => { tick().then(() => {
main_resolve(true); main.resolve(true);
tick().then(() => { tick().then(() => {
b_resolve(true); b.resolve(true);
}).then(() => { }).then(() => {
a_resolve(true); a.resolve(true);
}); });
}) })
</script> </script>
<svelte:head> <svelte:head>
{#if await main_promise} {#if await main.promise}
<title>Main</title> <title>Main</title>
{/if} {/if}
</svelte:head> </svelte:head>
<A promise={a_promise}/> <A promise={a.promise}/>
<B promise={b_promise}/> <B promise={b.promise}/>

Loading…
Cancel
Save