~mmach/netext73/webkit2gtk

« back to all changes in this revision

Viewing changes to Source/JavaScriptCore/inspector/protocol/Animation.json

  • Committer: mmach
  • Date: 2023-06-16 17:21:37 UTC
  • Revision ID: netbit73@gmail.com-20230616172137-2rqx6yr96ga9g3kp
1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
{
 
2
    "domain": "Animation",
 
3
    "description": "Domain for tracking/modifying Web Animations, as well as CSS (declarative) animations and transitions.",
 
4
    "debuggableTypes": ["page", "web-page"],
 
5
    "targetTypes": ["page"],
 
6
    "types": [
 
7
        {
 
8
            "id": "AnimationId",
 
9
            "type": "string",
 
10
            "description": "Unique Web Animation identifier."
 
11
        },
 
12
        {
 
13
            "id": "AnimationState",
 
14
            "type": "string",
 
15
            "enum": ["ready", "delayed", "active", "canceled", "done"]
 
16
        },
 
17
        {
 
18
            "id": "PlaybackDirection",
 
19
            "type": "string",
 
20
            "enum": ["normal", "reverse", "alternate", "alternate-reverse"]
 
21
        },
 
22
        {
 
23
            "id": "FillMode",
 
24
            "type": "string",
 
25
            "enum": ["none", "forwards", "backwards", "both", "auto"]
 
26
        },
 
27
        {
 
28
            "id": "Animation",
 
29
            "type": "object",
 
30
            "properties": [
 
31
                { "name": "animationId", "$ref": "AnimationId" },
 
32
                { "name": "cssAnimationName", "type": "string", "optional": true, "description": "Equal to the corresponding `animation-name` CSS property. Should not be provided if `transitionProperty` is also provided." },
 
33
                { "name": "cssTransitionProperty", "type": "string", "optional": true, "description": "Equal to the corresponding `transition-property` CSS property. Should not be provided if `animationName` is also provided." },
 
34
                { "name": "effect", "$ref": "Effect", "optional": true },
 
35
                { "name": "backtrace", "type": "array", "items": { "$ref": "Console.CallFrame" }, "optional": true, "description": "Backtrace that was captured when this `WebAnimation` was created." }
 
36
            ]
 
37
        },
 
38
        {
 
39
            "id": "Effect",
 
40
            "type": "object",
 
41
            "properties": [
 
42
                { "name": "startDelay", "type": "number", "optional": true },
 
43
                { "name": "endDelay", "type": "number", "optional": true },
 
44
                { "name": "iterationCount", "type": "number", "optional": true, "description": "Number of iterations in the animation." },
 
45
                { "name": "iterationStart", "type": "number", "optional": true, "description": "Index of which iteration to start at." },
 
46
                { "name": "iterationDuration", "type": "number", "optional": true, "description": "Total time of each iteration, measured in milliseconds." },
 
47
                { "name": "timingFunction", "type": "string", "optional": true, "description": "CSS timing function of the overall animation." },
 
48
                { "name": "playbackDirection", "$ref": "PlaybackDirection", "optional": true },
 
49
                { "name": "fillMode", "$ref": "FillMode", "optional": true },
 
50
                { "name": "keyframes", "type": "array", "items": { "$ref": "Keyframe" }, "optional": true }
 
51
            ]
 
52
        },
 
53
        {
 
54
            "id": "Keyframe",
 
55
            "type": "object",
 
56
            "properties": [
 
57
                { "name": "offset", "type": "number", "description": "Decimal percentage [0,1] representing where this keyframe is in the entire duration of the animation." },
 
58
                { "name": "easing", "type": "string", "optional": true, "description": "CSS timing function for how the `style` is applied." },
 
59
                { "name": "style", "type": "string", "optional": true, "description": "CSS style declaration of the CSS properties that will be animated." }
 
60
            ]
 
61
        },
 
62
        {
 
63
            "id": "TrackingUpdate",
 
64
            "type": "object",
 
65
            "properties": [
 
66
                { "name": "trackingAnimationId", "$ref": "AnimationId" },
 
67
                { "name": "animationState", "$ref": "AnimationState" },
 
68
                { "name": "nodeId", "$ref": "DOM.NodeId", "optional": true },
 
69
                { "name": "animationName", "type": "string", "optional": true, "description": "Equal to the corresponding `animation-name` CSS property. Should not be provided if `transitionProperty` is also provided." },
 
70
                { "name": "transitionProperty", "type": "string", "optional": true, "description": "Equal to the corresponding `transition-property` CSS property. Should not be provided if `animationName` is also provided." }
 
71
            ]
 
72
        }
 
73
    ],
 
74
    "commands": [
 
75
        {
 
76
            "name": "enable",
 
77
            "description": "Enables Canvas domain events."
 
78
        },
 
79
        {
 
80
            "name": "disable",
 
81
            "description": "Disables Canvas domain events."
 
82
        },
 
83
        {
 
84
            "name": "requestEffectTarget",
 
85
            "description": "Gets the `DOM.NodeId` for the target of the effect of the animation with the given `AnimationId`.",
 
86
            "parameters": [
 
87
                { "name": "animationId", "$ref": "AnimationId" }
 
88
            ],
 
89
            "returns": [
 
90
                { "name": "nodeId", "$ref": "DOM.NodeId" }
 
91
            ]
 
92
        },
 
93
        {
 
94
            "name": "resolveAnimation",
 
95
            "description": "Resolves JavaScript `WebAnimation` object for given `AnimationId`.",
 
96
            "parameters": [
 
97
                { "name": "animationId", "$ref": "AnimationId" },
 
98
                { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." }
 
99
            ],
 
100
            "returns": [
 
101
                { "name": "object", "$ref": "Runtime.RemoteObject" }
 
102
            ]
 
103
        },
 
104
        {
 
105
            "name": "startTracking",
 
106
            "description": "Start tracking animations. This will produce a `trackingStart` event."
 
107
        },
 
108
        {
 
109
            "name": "stopTracking",
 
110
            "description": "Stop tracking animations. This will produce a `trackingComplete` event."
 
111
        }
 
112
    ],
 
113
    "events": [
 
114
        {
 
115
            "name": "animationCreated",
 
116
            "description": "Dispatched whenever a `WebAnimation` is created.",
 
117
            "parameters": [
 
118
                { "name": "animation", "$ref": "Animation" }
 
119
            ]
 
120
        },
 
121
        {
 
122
            "name": "effectChanged",
 
123
            "description": "Dispatched whenever the effect of any animation is changed in any way.",
 
124
            "parameters": [
 
125
                { "name": "animationId", "$ref": "AnimationId" },
 
126
                { "name": "effect", "$ref": "Effect", "optional": true, "description": "This is omitted when the effect is removed without a replacement." }
 
127
            ]
 
128
        },
 
129
        {
 
130
            "name": "targetChanged",
 
131
            "description": "Dispatched whenever the target of any effect of any animation is changed in any way.",
 
132
            "parameters": [
 
133
                { "name": "animationId", "$ref": "AnimationId" }
 
134
            ]
 
135
        },
 
136
        {
 
137
            "name": "animationDestroyed",
 
138
            "description": "Dispatched whenever a `WebAnimation` is destroyed.",
 
139
            "parameters": [
 
140
                { "name": "animationId", "$ref": "AnimationId" }
 
141
            ]
 
142
        },
 
143
        {
 
144
            "name": "trackingStart",
 
145
            "description": "Dispatched after `startTracking` command.",
 
146
            "parameters": [
 
147
                { "name": "timestamp", "type": "number" }
 
148
            ]
 
149
        },
 
150
        {
 
151
            "name": "trackingUpdate",
 
152
            "description": "Fired for each phase of Web Animation.",
 
153
            "parameters": [
 
154
                { "name": "timestamp", "type": "number" },
 
155
                { "name": "event", "$ref": "TrackingUpdate" }
 
156
            ]
 
157
        },
 
158
        {
 
159
            "name": "trackingComplete",
 
160
            "description": "Dispatched after `stopTracking` command.",
 
161
            "parameters": [
 
162
                { "name": "timestamp", "type": "number" }
 
163
            ]
 
164
        }
 
165
    ]
 
166
}