tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

KeyframeEffect.webidl (2195B)


      1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* This Source Code Form is subject to the terms of the Mozilla Public
      3 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
      4 * You can obtain one at http://mozilla.org/MPL/2.0/.
      5 *
      6 * The origin of this IDL file is
      7 * https://drafts.csswg.org/web-animations/#the-keyframeeffect-interfaces
      8 *
      9 * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
     10 * liability, trademark and document use rules apply.
     11 */
     12 
     13 enum IterationCompositeOperation {
     14  "replace",
     15  "accumulate"
     16 };
     17 
     18 dictionary KeyframeEffectOptions : EffectTiming {
     19  IterationCompositeOperation iterationComposite = "replace";
     20  CompositeOperation          composite = "replace";
     21  DOMString?                  pseudoElement = null;
     22 };
     23 
     24 // KeyframeEffect should run in the caller's compartment to do custom
     25 // processing on the `keyframes` object.
     26 [RunConstructorInCallerCompartment, Exposed=Window]
     27 interface KeyframeEffect : AnimationEffect {
     28  [Throws]
     29  constructor(Element? target,
     30              object? keyframes,
     31              optional (unrestricted double or KeyframeEffectOptions) options = {});
     32  [Throws]
     33  constructor(KeyframeEffect source);
     34 
     35  attribute Element?                  target;
     36  [SetterThrows] attribute DOMString? pseudoElement;
     37  attribute IterationCompositeOperation     iterationComposite;
     38  attribute CompositeOperation              composite;
     39  [Throws] sequence<object> getKeyframes();
     40  [Throws] undefined        setKeyframes(object? keyframes);
     41 };
     42 
     43 // Non-standard extensions
     44 dictionary AnimationPropertyValueDetails {
     45  required double             offset;
     46           UTF8String         value;
     47           UTF8String         easing;
     48  required CompositeOperation composite;
     49 };
     50 
     51 dictionary AnimationPropertyDetails {
     52  required DOMString                               property;
     53  required boolean                                 runningOnCompositor;
     54           DOMString                               warning;
     55  required sequence<AnimationPropertyValueDetails> values;
     56 };
     57 
     58 partial interface KeyframeEffect {
     59  [ChromeOnly, Throws] sequence<AnimationPropertyDetails> getProperties();
     60 };