We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 52db511 commit 3aed7c6Copy full SHA for 3aed7c6
.changeset/weak-animals-search.md
@@ -4,16 +4,18 @@
4
5
Add `animate` API in Main Thread Script(MTS), so you can now control a CSS animation imperatively
6
7
-```
8
-function startAnimation() {
9
- 'main thread'
+```ts
+import type { MainThread } from '@lynx-js/types';
+
10
+function startAnimation(ele: MainThread.Element) {
11
+ 'main thread';
12
const animation = ele.animate([
13
{ opacity: 0 },
14
{ opacity: 1 },
15
], {
- duration: 3000
- })
16
+ duration: 3000,
17
+ });
18
- animation.pause()
19
+ animation.start();
20
}
21
```
0 commit comments