mirror of
https://github.com/withastro/astro.git
synced 2025-01-20 22:12:38 -05:00
fix: syntax error in changelog (#11869)
This commit is contained in:
parent
a85a184d9f
commit
9da5b3dab2
1 changed files with 3 additions and 3 deletions
|
@ -6,7 +6,7 @@ Adds a new object `swapFunctions` to expose the necessary utility functions on `
|
||||||
|
|
||||||
The example below uses these functions to replace Astro's built-in default `swap` function with one that only swaps the `<main>` part of the page:
|
The example below uses these functions to replace Astro's built-in default `swap` function with one that only swaps the `<main>` part of the page:
|
||||||
|
|
||||||
```astro
|
```html
|
||||||
<script>
|
<script>
|
||||||
import { swapFunctions } from 'astro:transitions/client';
|
import { swapFunctions } from 'astro:transitions/client';
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ function swapMainOnly(doc: Document) {
|
||||||
}
|
}
|
||||||
restoreFocusFunction();
|
restoreFocusFunction();
|
||||||
};
|
};
|
||||||
<script>
|
</script>
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [view transitions guide](https://docs.astro.build/en/guides/view-transitions/#astrobefore-swap) for more information about hooking into the `astro:before-swap` lifecycle event and adding a custom swap implementation.
|
See the [view transitions guide](https://docs.astro.build/en/guides/view-transitions/#astrobefore-swap) for more information about hooking into the `astro:before-swap` lifecycle event and adding a custom swap implementation.
|
||||||
|
|
Loading…
Add table
Reference in a new issue