author James Cheng <>
Fri, 05 Aug 2016 13:23:44 -0400
changeset 308428 8ee6f2eb8b349a351f6f76585eb85e0ec2b5c475
parent 299632 127e959fd8623aafd60d9eb347d3e98a75d4769c
child 311083 d3f16aced88cedbed06bf0c452ea44aae39aaebc
permissions -rw-r--r--
Bug 1291229 - Fix typo for moving Java bindings to mozilla::java namespace. r=jchen MozReview-Commit-ID: KGAS6EhnwAI

/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at
 * The origin of this IDL file is
 * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
 * liability, trademark and document use rules apply.

enum AnimationPlayState { "idle", "pending", "running", "paused", "finished" };

 Constructor (optional KeyframeEffectReadOnly? effect = null,
              optional AnimationTimeline? timeline)]
interface Animation : EventTarget {
  attribute DOMString id;
  // Bug 1049975: Make 'effect' writeable
  [Func="nsDocument::IsWebAnimationsEnabled", Pure]
  readonly attribute AnimationEffectReadOnly? effect;
  attribute AnimationTimeline? timeline;
  attribute double? startTime;
  [SetterThrows, BinaryName="currentTimeAsDouble"]
  attribute double? currentTime;

           attribute double             playbackRate;
  readonly attribute AnimationPlayState playState;
  [Func="nsDocument::IsWebAnimationsEnabled", Throws]
  readonly attribute Promise<Animation> ready;
  [Func="nsDocument::IsWebAnimationsEnabled", Throws]
  readonly attribute Promise<Animation> finished;
           attribute EventHandler       onfinish;
           attribute EventHandler       oncancel;
  void cancel ();
  void finish ();
  [Throws, BinaryName="playFromJS"]
  void play ();
  [Throws, BinaryName="pauseFromJS"]
  void pause ();
  void reverse ();

// Non-standard extensions
partial interface Animation {
  [ChromeOnly] readonly attribute boolean isRunningOnCompositor;