Re: [w3ctag/design-reviews] ViewTransitions: waitUntil() method (Issue #1158)

christianliebel left a comment (w3ctag/design-reviews#1158)

Thanks for sending in your proposal. We are closing this as **satisfied with concerns**. The use case seems fine, but the concern is that it may not be immediately obvious _what_ is delayed until _when_ just from the method name `waitUntil()`.

We think it's justifiable to use this name, as the method name `startViewTransition()` implies that the view transition will start instantly, and that the resulting `ViewTransition` "waits until" the promise(s) passed to the method settle before completing:

```js
let viewTransition = document.startViewTransition();
viewTransition.waitUntil(promise1);
viewTransition.waitUntil(promise2);
viewTransition.waitUntil(promise3);
```
While there is a certain appeal in reusing the `waitUntil()` semantics from Service Worker's `ExtendableEvent`s, a view transition is not an event, and service workers are a very different area of programming, so not all developers may be familiar with the semantics. We would also support a more descriptive name (e.g., `delayCompletionUntil()`) with or without `waitUntil()` semantics (would developers really pass multiple promises?).

If you choose `waitUntil()`, we recommend providing clear developer documentation that clearly indicates the effects of calling this method.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/1158#issuecomment-3628179276
You are receiving this because you are subscribed to this thread.

Message ID: <w3ctag/design-reviews/issues/1158/3628179276@github.com>

Received on Monday, 8 December 2025 17:29:57 UTC