-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed as not planned
Description
The problem
Previously, only the following use case was available when using the View Transition API:
document.startViewTransition(() => updateTheDOMSomehow(data));
Now all major browsers (except Firefox) support View Transition types, but Svelte doesn't provide needed typescript types
Solution
New types should be added according to the standard
const direction = determineBackwardsOrForwards();
const t = document.startViewTransition({
update: updateTheDOMSomehow,
types: ['slide', direction],
});
Example from Chrome for developers
Importance
Without this, it is extremely difficult to use the View Transition API in conjunction with TypeScript