Documentation
¶
Overview ¶
Package animation provides the Chrome DevTools Protocol commands, types, and events for the Animation domain.
Generated by the pdlgen command.
Index ¶
- Constants
- Variables
- type Animation
- type Effect
- type EventAnimationCanceled
- type EventAnimationCreated
- type EventAnimationStarted
- type EventAnimationUpdated
- type GetCurrentTimeParams
- type GetCurrentTimeResult
- type GetPlaybackRateResult
- type KeyframeStyle
- type KeyframesRule
- type ReleaseAnimationsParams
- type ResolveAnimationParams
- type ResolveAnimationResult
- type SeekAnimationsParams
- type SetPausedParams
- type SetPlaybackRateParams
- type SetTimingParams
- type Type
- type ViewOrScrollTimeline
Constants ¶
const ( CommandDisable = "Animation.disable" CommandEnable = "Animation.enable" CommandGetCurrentTime = "Animation.getCurrentTime" CommandGetPlaybackRate = "Animation.getPlaybackRate" CommandReleaseAnimations = "Animation.releaseAnimations" CommandResolveAnimation = "Animation.resolveAnimation" CommandSeekAnimations = "Animation.seekAnimations" CommandSetPaused = "Animation.setPaused" CommandSetPlaybackRate = "Animation.setPlaybackRate" CommandSetTiming = "Animation.setTiming" )
Command names.
Variables ¶
var AnimationCanceled = cdp.Event[EventAnimationCanceled]{Method: "Animation.animationCanceled"}
AnimationCanceled event for when an animation has been cancelled.
See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#event-animationCanceled
var AnimationCreated = cdp.Event[EventAnimationCreated]{Method: "Animation.animationCreated"}
AnimationCreated event for each animation that has been created.
See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#event-animationCreated
var AnimationStarted = cdp.Event[EventAnimationStarted]{Method: "Animation.animationStarted"}
AnimationStarted event for animation that has been started.
See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#event-animationStarted
var AnimationUpdated = cdp.Event[EventAnimationUpdated]{Method: "Animation.animationUpdated"}
AnimationUpdated event for animation that has been updated.
See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#event-animationUpdated
var Disable = cdp.Command[cdp.Empty, cdp.Empty]{Method: CommandDisable}
Disable disables animation domain notifications.
See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#method-disable
var Enable = cdp.Command[cdp.Empty, cdp.Empty]{Method: CommandEnable}
Enable enables animation domain notifications.
See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#method-enable
var GetCurrentTime = cdp.Command[GetCurrentTimeParams, GetCurrentTimeResult]{Method: CommandGetCurrentTime}
GetCurrentTime returns the current time of the an animation.
See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#method-getCurrentTime
var GetPlaybackRate = cdp.Command[cdp.Empty, GetPlaybackRateResult]{Method: CommandGetPlaybackRate}
GetPlaybackRate gets the playback rate of the document timeline.
See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#method-getPlaybackRate
var ReleaseAnimations = cdp.Command[ReleaseAnimationsParams, cdp.Empty]{Method: CommandReleaseAnimations}
ReleaseAnimations releases a set of animations to no longer be manipulated.
See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#method-releaseAnimations
var ResolveAnimation = cdp.Command[ResolveAnimationParams, ResolveAnimationResult]{Method: CommandResolveAnimation}
ResolveAnimation gets the remote object of the Animation.
See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#method-resolveAnimation
var SeekAnimations = cdp.Command[SeekAnimationsParams, cdp.Empty]{Method: CommandSeekAnimations}
SeekAnimations seek a set of animations to a particular time within each animation.
See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#method-seekAnimations
var SetPaused = cdp.Command[SetPausedParams, cdp.Empty]{Method: CommandSetPaused}
SetPaused sets the paused state of a set of animations.
See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#method-setPaused
var SetPlaybackRate = cdp.Command[SetPlaybackRateParams, cdp.Empty]{Method: CommandSetPlaybackRate}
SetPlaybackRate sets the playback rate of the document timeline.
See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#method-setPlaybackRate
var SetTiming = cdp.Command[SetTimingParams, cdp.Empty]{Method: CommandSetTiming}
SetTiming sets the timing of an animation node.
See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#method-setTiming
Functions ¶
This section is empty.
Types ¶
type Animation ¶
type Animation struct {
ID string `json:"id"` // Animation's id.
Name string `json:"name"` // Animation's name.
PausedState bool `json:"pausedState"` // Animation's internal paused state.
PlayState string `json:"playState"` // Animation's play state.
PlaybackRate float64 `json:"playbackRate"` // Animation's playback rate.
StartTime float64 `json:"startTime"` // Animation's start time. Milliseconds for time based animations and percentage [0 - 100] for scroll driven animations (i.e. when viewOrScrollTimeline exists).
CurrentTime float64 `json:"currentTime"` // Animation's current time.
Type Type `json:"type"` // Animation type of Animation.
Source *Effect `json:"source,omitempty,omitzero"` // Animation's source animation node.
CSSID string `json:"cssId,omitempty,omitzero"` // A unique ID for Animation representing the sources that triggered this CSS animation/transition.
ViewOrScrollTimeline *ViewOrScrollTimeline `json:"viewOrScrollTimeline,omitempty,omitzero"` // View or scroll timeline
}
Animation animation instance.
See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#type-Animation
type Effect ¶
type Effect struct {
Delay float64 `json:"delay"` // AnimationEffect's delay.
EndDelay float64 `json:"endDelay"` // AnimationEffect's end delay.
IterationStart float64 `json:"iterationStart"` // AnimationEffect's iteration start.
Iterations float64 `json:"iterations,omitempty,omitzero"` // AnimationEffect's iterations. Omitted if the value is infinite.
Duration float64 `json:"duration"` // AnimationEffect's iteration duration. Milliseconds for time based animations and percentage [0 - 100] for scroll driven animations (i.e. when viewOrScrollTimeline exists).
Direction string `json:"direction"` // AnimationEffect's playback direction.
Fill string `json:"fill"` // AnimationEffect's fill mode.
BackendNodeID cdp.BackendNodeID `json:"backendNodeId,omitempty,omitzero"` // AnimationEffect's target node.
KeyframesRule *KeyframesRule `json:"keyframesRule,omitempty,omitzero"` // AnimationEffect's keyframes.
Easing string `json:"easing"` // AnimationEffect's timing function.
}
Effect animationEffect instance.
See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#type-AnimationEffect
type EventAnimationCanceled ¶
type EventAnimationCanceled struct {
ID string `json:"id"` // Id of the animation that was cancelled.
}
EventAnimationCanceled event for when an animation has been cancelled.
See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#event-animationCanceled
type EventAnimationCreated ¶
type EventAnimationCreated struct {
ID string `json:"id"` // Id of the animation that was created.
}
EventAnimationCreated event for each animation that has been created.
See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#event-animationCreated
type EventAnimationStarted ¶
type EventAnimationStarted struct {
Animation *Animation `json:"animation"` // Animation that was started.
}
EventAnimationStarted event for animation that has been started.
See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#event-animationStarted
type EventAnimationUpdated ¶
type EventAnimationUpdated struct {
Animation *Animation `json:"animation"` // Animation that was updated.
}
EventAnimationUpdated event for animation that has been updated.
See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#event-animationUpdated
type GetCurrentTimeParams ¶
type GetCurrentTimeParams struct {
ID string `json:"id"` // Id of animation.
}
GetCurrentTimeParams are the parameters of the command Animation.getCurrentTime.
type GetCurrentTimeResult ¶ added in v0.157.3
type GetCurrentTimeResult struct {
CurrentTime float64 `json:"currentTime,omitempty,omitzero"` // Current time of the page.
}
GetCurrentTimeResult is the result of the command Animation.getCurrentTime.
type GetPlaybackRateResult ¶ added in v0.157.3
type GetPlaybackRateResult struct {
PlaybackRate float64 `json:"playbackRate,omitempty,omitzero"` // Playback rate for animations on page.
}
GetPlaybackRateResult is the result of the command Animation.getPlaybackRate.
type KeyframeStyle ¶
type KeyframeStyle struct {
Offset string `json:"offset"` // Keyframe's time offset.
Easing string `json:"easing"` // AnimationEffect's timing function.
}
KeyframeStyle keyframe Style.
See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#type-KeyframeStyle
type KeyframesRule ¶
type KeyframesRule struct {
Name string `json:"name,omitempty,omitzero"` // CSS keyframed animation's name.
Keyframes []*KeyframeStyle `json:"keyframes"` // List of animation keyframes.
}
KeyframesRule keyframes Rule.
See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#type-KeyframesRule
type ReleaseAnimationsParams ¶
type ReleaseAnimationsParams struct {
Animations []string `json:"animations"` // List of animation ids to seek.
}
ReleaseAnimationsParams are the parameters of the command Animation.releaseAnimations.
type ResolveAnimationParams ¶
type ResolveAnimationParams struct {
AnimationID string `json:"animationId"` // Animation id.
}
ResolveAnimationParams are the parameters of the command Animation.resolveAnimation.
type ResolveAnimationResult ¶ added in v0.157.3
type ResolveAnimationResult struct {
RemoteObject *runtime.RemoteObject `json:"remoteObject,omitempty,omitzero"` // Corresponding remote object.
}
ResolveAnimationResult is the result of the command Animation.resolveAnimation.
type SeekAnimationsParams ¶
type SeekAnimationsParams struct {
Animations []string `json:"animations"` // List of animation ids to seek.
CurrentTime *float64 `json:"currentTime,omitempty,omitzero"` // Set each animation to the same time.
CurrentTimes []float64 `json:"currentTimes,omitempty,omitzero"` // Set each animation to a different time. If set, should have the same length as animations. Exactly one of currentTime or currentTimes should be set.
}
SeekAnimationsParams are the parameters of the command Animation.seekAnimations.
type SetPausedParams ¶
type SetPausedParams struct {
Animations []string `json:"animations"` // Animations to set the pause state of.
Paused bool `json:"paused"` // Paused state to set to.
}
SetPausedParams are the parameters of the command Animation.setPaused.
type SetPlaybackRateParams ¶
type SetPlaybackRateParams struct {
PlaybackRate float64 `json:"playbackRate"` // Playback rate for animations on page
}
SetPlaybackRateParams are the parameters of the command Animation.setPlaybackRate.
type SetTimingParams ¶
type SetTimingParams struct {
AnimationID string `json:"animationId"` // Animation id.
Duration float64 `json:"duration"` // Duration of the animation.
Delay float64 `json:"delay"` // Delay of the animation.
}
SetTimingParams are the parameters of the command Animation.setTiming.
type Type ¶ added in v0.157.1
type Type string
Type animation type of Animation.
See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#type-Animation
type ViewOrScrollTimeline ¶
type ViewOrScrollTimeline struct {
SourceNodeID cdp.BackendNodeID `json:"sourceNodeId,omitempty,omitzero"` // Scroll container node
StartOffset float64 `json:"startOffset,omitempty,omitzero"` // Represents the starting scroll position of the timeline as a length offset in pixels from scroll origin.
EndOffset float64 `json:"endOffset,omitempty,omitzero"` // Represents the ending scroll position of the timeline as a length offset in pixels from scroll origin.
SubjectNodeID cdp.BackendNodeID `json:"subjectNodeId,omitempty,omitzero"` // The element whose principal box's visibility in the scrollport defined the progress of the timeline. Does not exist for animations with ScrollTimeline
Axis dom.ScrollOrientation `json:"axis"` // Orientation of the scroll
}
ViewOrScrollTimeline timeline instance.
See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#type-ViewOrScrollTimeline