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

Loading…
Cancel
Save