blob: 23c9a64919772e7f631cf1408fa9453e859c2219 [file] [log] [blame]
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// https://wicg.github.io/animation-worklet/#animationworkletglobalscope
[
Exposed=AnimationWorklet,
Global=(Worklet,AnimationWorklet),
RuntimeEnabled=AnimationWorklet
] interface AnimationWorkletGlobalScope : WorkletGlobalScope {
[MeasureAs=AnimationWorkletRegisterAnimator, RaisesException] void registerAnimator(DOMString name, AnimatorConstructor animatorCtor);
};
// Blink-specific types
// https://wicg.github.io/animation-worklet/#create-a-new-animator-instance
callback AnimatorConstructor = any (any options, any state);
// https://wicg.github.io/animation-worklet/#run-animators
callback AnimateCallback = void (double currentTime, (WorkletAnimationEffect or WorkletGroupEffect) effect);
// https://drafts.css-houdini.org/css-animationworklet/#stateful-animator-desc
callback StateCallback = any ();