aa-coordination
Rich Harris 8 months ago
parent ca11ebdde4
commit 42a59e2966

@ -133,6 +133,7 @@ export function boundary(node, props, children) {
// @ts-ignore We re-use the effect's fn property to avoid allocation of an additional field // @ts-ignore We re-use the effect's fn property to avoid allocation of an additional field
boundary.fn = (/** @type {unknown} */ input, /** @type {Function} */ payload) => { boundary.fn = (/** @type {unknown} */ input, /** @type {Function} */ payload) => {
if (input === ASYNC_INCREMENT) { if (input === ASYNC_INCREMENT) {
boundary.f |= BOUNDARY_SUSPENDED;
async_count++; async_count++;
// TODO post-init, show the pending snippet after a timeout // TODO post-init, show the pending snippet after a timeout
@ -246,6 +247,8 @@ export function boundary(node, props, children) {
main_effect = branch(() => children(anchor)); main_effect = branch(() => children(anchor));
if (async_count > 0) { if (async_count > 0) {
boundary.f |= BOUNDARY_SUSPENDED;
if (pending) { if (pending) {
offscreen_fragment = document.createDocumentFragment(); offscreen_fragment = document.createDocumentFragment();
move_effect(main_effect, offscreen_fragment); move_effect(main_effect, offscreen_fragment);

Loading…
Cancel
Save