Re: [csswg-drafts] [css-view-transitions-2] Script event on new Document for cross-document ViewTransitions (#8805)

I'm pretty convinced that we should fire the `reveal` event even when there is no view transition. The use case is that authors that do use view transitions, might want to do something specifically if the view transition is not present (e.g. the previous page hasn't opted in. e.g.:

```js
document.addEventListener("reveal", event => {
   if (event.viewTransition) {
     event.viewTransition.ready.then(() => { animate... });
     event.viewTransition.finished.then(() => { postTranisitonChanges(); });
   } else {
     postTranisitonChanges();
   }
});
```



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


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

Received on Wednesday, 19 July 2023 12:30:00 UTC