chromium/third_party/blink/renderer/modules/animationworklet/animation_worklet_global_scope.idl

// Copyright 2016 The Chromium Authors
// 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 ();