Skip to content

Commit

Permalink
Update the Animation Worklet IDL file + test (#12444)
Browse files Browse the repository at this point in the history
  • Loading branch information
foolip committed Aug 13, 2018
1 parent ff4e72e commit b357235
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 29 deletions.
17 changes: 17 additions & 0 deletions animation-worklet/idlharness.any.js
@@ -0,0 +1,17 @@
// META: script=/resources/WebIDLParser.js
// META: script=/resources/idlharness.js

'use strict';

// https://wicg.github.io/animation-worklet/

idl_test(
['animation-worklet'],
['worklets', 'web-animations', 'html', 'cssom', 'dom'],
idl_array => {
idl_array.add_objects({
WorkletAnimation: ['new WorkletAnimation("name")'],
// TODO: WorkletGroupEffect
});
}
);
16 changes: 0 additions & 16 deletions animation-worklet/interfaces.any.js

This file was deleted.

22 changes: 9 additions & 13 deletions interfaces/animation-worklet.idl
@@ -1,35 +1,31 @@
// GENERATED CONTENT - DO NOT EDIT
// Content of this file was automatically extracted from the
// "CSS Animation Worklet API" spec.
// See: https://wicg.github.io/animation-worklet/
// Content was automatically extracted by Reffy into reffy-reports
// (https://github.com/tidoust/reffy-reports)
// Source: CSS Animation Worklet API (https://wicg.github.io/animation-worklet/)

partial interface Window {
partial namespace CSS {
[SameObject] readonly attribute Worklet animationWorklet;
};

callback VoidFunction = void ();

[ Exposed=AnimationWorklet, Global=AnimationWorklet ]
interface AnimationWorkletGlobalScope : WorkletGlobalScope {
void registerAnimator(DOMString name, VoidFunction animatorCtor);
};

[Constructor (DOMString animatorName,
optional (AnimationEffectReadOnly or sequence)? effects = null,
optional (AnimationEffect or sequence<AnimationEffect>)? effects = null,
optional AnimationTimeline? timeline,
optional any options)]
interface WorkletAnimation : Animation {
readonly attribute DOMString animatorName;
};

interface WorkletGroupEffectReadOnly : GroupEffectReadOnly {};

interface WorkletGroupEffect : WorkletGroupEffectReadOnly {};
WorkletGroupEffect implements AnimationEffectMutable;
WorkletGroupEffect implements GroupEffectMutable;
interface WorkletGroupEffect {
sequence<AnimationEffect> getChildren();
};

[Exposed=AnimationWorklet]
partial interface AnimationEffectReadOnly {
partial interface AnimationEffect {
// Intended for use inside Animation Worklet scope to drive the effect.
attribute double localTime;
};

0 comments on commit b357235

Please sign in to comment.