Re: [csswg-drafts] [css-view-transitions] Behavior of calling `document.startViewTransition` synchronously more than once (#11292)

The best practice here would be to use `updateCallbackDone`:
```js
const $input = $label.querySelector('input');

await document.startViewTransition(() => {
 $input.checked = !$input.checked;
}).updateCallbackDone;

document.startViewTransition(() => {
 document.body.style.padding = `${Math.random() * 10}rem`;
});
```

-- 
GitHub Notification of comment by noamr
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11292#issuecomment-2506401448 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 28 November 2024 15:46:23 UTC