Re: [csswg-drafts] [css-view-transitions-2] Distinguish between old and new DOM in CSS (#9424)

@khushalsagar For the use cases I can think of we'd always have a good idea of the old/new types at the time of triggering it. The only time it's not explicit from us is in handling back/forwards navigation. That's not too hard in this case though as I'd imagine we'd just swap out the `types` & `newTypes`.

> // If newType is specified, its used as types on the new DOM instead of type.

Is this allowed to be an array or just a single possible item on each call? Assuming the former due to naming but wanted to check.

```tsx
${Transition.map({
  box: {
    old: '--box-pdp',
    new: '--box-checkout'
  }
})}
```
From my example above, would now become something like this?
```tsx
document.startViewTransition(updateTheDOMSomehow, { 
  types: 'box-pdp', 
  newTypes: 'box-checkout',
});
```

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


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

Received on Wednesday, 22 November 2023 20:00:58 UTC