import "github.com/chromedp/cdproto/animation"
Package animation provides the Chrome DevTools Protocol commands, types, and events for the Animation domain.
Generated by the cdproto-gen command.
animation.go easyjson.go events.go types.go
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.
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. CurrentTime float64 `json:"currentTime"` // Animation's current time. Type Type `json:"type"` // Animation type of Animation. Source *Effect `json:"source,omitempty"` // Animation's source animation node. CSSID string `json:"cssId,omitempty"` // A unique ID for Animation representing the sources that triggered this CSS animation/transition. }
Animation animation instance.
See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#type-Animation
MarshalEasyJSON supports easyjson.Marshaler interface
MarshalJSON supports json.Marshaler interface
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
UnmarshalJSON supports json.Unmarshaler interface
type DisableParams struct{}
DisableParams disables animation domain notifications.
func Disable() *DisableParams
Disable disables animation domain notifications.
See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#method-disable
func (p *DisableParams) Do(ctx context.Context) (err error)
Do executes Animation.disable against the provided context.
func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v DisableParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *DisableParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
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"` // AnimationEffect's iterations. Duration float64 `json:"duration"` // AnimationEffect's iteration duration. Direction string `json:"direction"` // AnimationEffect's playback direction. Fill string `json:"fill"` // AnimationEffect's fill mode. BackendNodeID cdp.BackendNodeID `json:"backendNodeId,omitempty"` // AnimationEffect's target node. KeyframesRule *KeyframesRule `json:"keyframesRule,omitempty"` // 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
MarshalEasyJSON supports easyjson.Marshaler interface
MarshalJSON supports json.Marshaler interface
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
UnmarshalJSON supports json.Unmarshaler interface
type EnableParams struct{}
EnableParams enables animation domain notifications.
func Enable() *EnableParams
Enable enables animation domain notifications.
See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#method-enable
func (p *EnableParams) Do(ctx context.Context) (err error)
Do executes Animation.enable against the provided context.
func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v EnableParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *EnableParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
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
func (v EventAnimationCanceled) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v EventAnimationCanceled) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *EventAnimationCanceled) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *EventAnimationCanceled) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
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
func (v EventAnimationCreated) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v EventAnimationCreated) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *EventAnimationCreated) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *EventAnimationCreated) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
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
func (v EventAnimationStarted) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v EventAnimationStarted) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *EventAnimationStarted) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *EventAnimationStarted) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
GetCurrentTimeParams returns the current time of the an animation.
func GetCurrentTime(id string) *GetCurrentTimeParams
GetCurrentTime returns the current time of the an animation.
See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#method-getCurrentTime
parameters:
id - Id of animation.
Do executes Animation.getCurrentTime against the provided context.
returns:
currentTime - Current time of the page.
func (v GetCurrentTimeParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v GetCurrentTimeParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *GetCurrentTimeParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *GetCurrentTimeParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type GetCurrentTimeReturns struct { CurrentTime float64 `json:"currentTime,omitempty"` // Current time of the page. }
GetCurrentTimeReturns return values.
func (v GetCurrentTimeReturns) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v GetCurrentTimeReturns) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *GetCurrentTimeReturns) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *GetCurrentTimeReturns) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type GetPlaybackRateParams struct{}
GetPlaybackRateParams gets the playback rate of the document timeline.
func GetPlaybackRate() *GetPlaybackRateParams
GetPlaybackRate gets the playback rate of the document timeline.
See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#method-getPlaybackRate
Do executes Animation.getPlaybackRate against the provided context.
returns:
playbackRate - Playback rate for animations on page.
func (v GetPlaybackRateParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v GetPlaybackRateParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *GetPlaybackRateParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *GetPlaybackRateParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type GetPlaybackRateReturns struct { PlaybackRate float64 `json:"playbackRate,omitempty"` // Playback rate for animations on page. }
GetPlaybackRateReturns return values.
func (v GetPlaybackRateReturns) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v GetPlaybackRateReturns) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *GetPlaybackRateReturns) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *GetPlaybackRateReturns) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
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
func (v KeyframeStyle) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v KeyframeStyle) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *KeyframeStyle) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *KeyframeStyle) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type KeyframesRule struct { Name string `json:"name,omitempty"` // 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
func (v KeyframesRule) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v KeyframesRule) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *KeyframesRule) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *KeyframesRule) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type ReleaseAnimationsParams struct { Animations []string `json:"animations"` // List of animation ids to seek. }
ReleaseAnimationsParams releases a set of animations to no longer be manipulated.
func ReleaseAnimations(animations []string) *ReleaseAnimationsParams
ReleaseAnimations releases a set of animations to no longer be manipulated.
See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#method-releaseAnimations
parameters:
animations - List of animation ids to seek.
func (p *ReleaseAnimationsParams) Do(ctx context.Context) (err error)
Do executes Animation.releaseAnimations against the provided context.
func (v ReleaseAnimationsParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v ReleaseAnimationsParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *ReleaseAnimationsParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *ReleaseAnimationsParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
ResolveAnimationParams gets the remote object of the Animation.
func ResolveAnimation(animationID string) *ResolveAnimationParams
ResolveAnimation gets the remote object of the Animation.
See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#method-resolveAnimation
parameters:
animationID - Animation id.
func (p *ResolveAnimationParams) Do(ctx context.Context) (remoteObject *runtime.RemoteObject, err error)
Do executes Animation.resolveAnimation against the provided context.
returns:
remoteObject - Corresponding remote object.
func (v ResolveAnimationParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v ResolveAnimationParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *ResolveAnimationParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *ResolveAnimationParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type ResolveAnimationReturns struct { RemoteObject *runtime.RemoteObject `json:"remoteObject,omitempty"` // Corresponding remote object. }
ResolveAnimationReturns return values.
func (v ResolveAnimationReturns) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v ResolveAnimationReturns) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *ResolveAnimationReturns) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *ResolveAnimationReturns) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type SeekAnimationsParams struct { Animations []string `json:"animations"` // List of animation ids to seek. CurrentTime float64 `json:"currentTime"` // Set the current time of each animation. }
SeekAnimationsParams seek a set of animations to a particular time within each animation.
func SeekAnimations(animations []string, currentTime float64) *SeekAnimationsParams
SeekAnimations seek a set of animations to a particular time within each animation.
See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#method-seekAnimations
parameters:
animations - List of animation ids to seek. currentTime - Set the current time of each animation.
func (p *SeekAnimationsParams) Do(ctx context.Context) (err error)
Do executes Animation.seekAnimations against the provided context.
func (v SeekAnimationsParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v SeekAnimationsParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *SeekAnimationsParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *SeekAnimationsParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type SetPausedParams struct { Animations []string `json:"animations"` // Animations to set the pause state of. Paused bool `json:"paused"` // Paused state to set to. }
SetPausedParams sets the paused state of a set of animations.
func SetPaused(animations []string, paused bool) *SetPausedParams
SetPaused sets the paused state of a set of animations.
See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#method-setPaused
parameters:
animations - Animations to set the pause state of. paused - Paused state to set to.
func (p *SetPausedParams) Do(ctx context.Context) (err error)
Do executes Animation.setPaused against the provided context.
func (v SetPausedParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v SetPausedParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *SetPausedParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *SetPausedParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type SetPlaybackRateParams struct { PlaybackRate float64 `json:"playbackRate"` // Playback rate for animations on page }
SetPlaybackRateParams sets the playback rate of the document timeline.
func SetPlaybackRate(playbackRate float64) *SetPlaybackRateParams
SetPlaybackRate sets the playback rate of the document timeline.
See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#method-setPlaybackRate
parameters:
playbackRate - Playback rate for animations on page
func (p *SetPlaybackRateParams) Do(ctx context.Context) (err error)
Do executes Animation.setPlaybackRate against the provided context.
func (v SetPlaybackRateParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v SetPlaybackRateParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *SetPlaybackRateParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *SetPlaybackRateParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
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 sets the timing of an animation node.
func SetTiming(animationID string, duration float64, delay float64) *SetTimingParams
SetTiming sets the timing of an animation node.
See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#method-setTiming
parameters:
animationID - Animation id. duration - Duration of the animation. delay - Delay of the animation.
func (p *SetTimingParams) Do(ctx context.Context) (err error)
Do executes Animation.setTiming against the provided context.
func (v SetTimingParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v SetTimingParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *SetTimingParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *SetTimingParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
Type animation type of Animation.
See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#type-Animation
const ( TypeCSSTransition Type = "CSSTransition" TypeCSSAnimation Type = "CSSAnimation" TypeWebAnimation Type = "WebAnimation" )
Type values.
MarshalEasyJSON satisfies easyjson.Marshaler.
MarshalJSON satisfies json.Marshaler.
String returns the Type as string value.
UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
UnmarshalJSON satisfies json.Unmarshaler.
Package animation imports 8 packages (graph) and is imported by 3 packages. Updated 2021-01-07. Refresh now. Tools for package owners.