You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<dd>An array containing the underlying pixel representation of the image, one of {{jsxref("Uint8ClampedArray")}}, {{jsxref("Uint16Array")}}, or {{jsxref("Float32Array")}}. If no such array is given, an image with a transparent black rectangle of the specified <code>width</code> and <code>height</code> will be created.</dd>
<p>The first type of constructor (see above) creates a completely new {{domxref("KeyframeEffect")}} object instance. Its parameters are:</p>
28
+
<p>The multi-argument constructor (see above) creates a completely new {{domxref("KeyframeEffect")}} object instance. Its parameters are:</p>
28
29
29
30
<dl>
30
-
<dt>element</dt>
31
+
<dt>target</dt>
31
32
<dd>The DOM element to be animated, or <code>null</code>.</dd>
32
-
<dt>keyframeSet</dt>
33
-
<dd>An<ahref="/en-US/docs/Web/API/Web_Animations_API/Keyframe_Formats">keyframe object</a> or <code>null</code>.</dd>
34
-
<dt>keyframeOptions {{optional_inline}}</dt>
33
+
<dt>keyframes</dt>
34
+
<dd>A<ahref="/en-US/docs/Web/API/Web_Animations_API/Keyframe_Formats">keyframes object</a> or <code>null</code>.</dd>
35
+
<dt>options {{optional_inline}}</dt>
35
36
<dd>
36
-
<p>Either an integer representing the animation's duration (in milliseconds), or an {{domxref("EffectTiming", "Object")}} containing one or more of the following:</p>
37
+
<p>Either an integer representing the animation's duration (in milliseconds), or an object containing one or more of the following:</p>
<dd>Whether the animation runs forwards (<code>normal</code>), backwards (<code>reverse</code>), switches direction after each iteration (<code>alternate</code>), or runs backwards and switches direction after each iteration (<code>alternate-reverse</code>). Defaults to <code>"normal"</code>.</dd>
<dd>The number of milliseconds each iteration of the animation takes to complete. Defaults to 0. Although this is technically optional, keep in mind that your animation will not run if this value is 0.</dd>
<dd>The rate of the animation's change over time. Accepts the pre-defined values <code>"linear"</code>, <code>"ease"</code>, <code>"ease-in"</code>, <code>"ease-out"</code>, and <code>"ease-in-out"</code>, or a custom <code>"cubic-bezier"</code> value like <code>"cubic-bezier(0.42, 0, 0.58, 1)"</code>. Defaults to <code>"linear"</code>.</dd>
<dd>Whether the animation runs forwards (<code>normal</code>), backwards (<code>reverse</code>), switches direction after each iteration (<code>alternate</code>), or runs backwards and switches direction after each iteration (<code>alternate-reverse</code>). Defaults to <code>"normal"</code>.</dd>
<dd>The number of milliseconds each iteration of the animation takes to complete. Defaults to 0. Although this is technically optional, keep in mind that your animation will not run if this value is 0.</dd>
48
+
49
+
<dt><code>easing</code> {{optional_inline}}</dt>
50
+
<dd>The rate of the animation's change over time. Accepts the pre-defined values <code>"linear"</code>, <code>"ease"</code>, <code>"ease-in"</code>, <code>"ease-out"</code>, and <code>"ease-in-out"</code>, or a custom <code>"cubic-bezier"</code> value like <code>"cubic-bezier(0.42, 0, 0.58, 1)"</code>. Defaults to <code>"linear"</code>.</dd>
<dd>The number of milliseconds to delay after the end of an animation. This is primarily of use when sequencing animations based on the end time of another animation. Defaults to 0. </dd>
<dd>Dictates whether the animation's effects should be reflected by the element(s) prior to playing (<code>"backwards"</code>), retained after the animation has completed playing (<code>"forwards"</code>), or <code>both</code>. Defaults to <code>"none"</code>.</dd>
<dd>Describes at what point in the iteration the animation should start. 0.5 would indicate starting halfway through the first iteration for example, and with this value set, an animation with 2 iterations would end halfway through a third iteration. Defaults to 0.0.</dd>
<dd>The number of times the animation should repeat. Defaults to <code>1</code>, and can also take a value of {{jsxref("Infinity")}} to make it repeat for as long as the element exists.</dd>
<dd>Determines how values build from iteration to iteration in the current animation.</dd>
64
-
</dl>
65
70
</dd>
66
71
</dl>
67
72
68
-
<p>The second type of constructor (see above) creates a clone of an existing {{domxref("KeyframeEffect")}} object instance. Its parameter is as follows:</p>
73
+
<p>The single argument constructor (see above) creates a clone of an existing {{domxref("KeyframeEffect")}} object instance. Its parameter is as follows:</p>
<p>In the <ahref="http://codepen.io/rachelnabors/pen/eJyWzm/?editors=0010">Follow the White Rabbit example</a>, the <code>KeyframeEffect</code> constructor is used to create a set of keyframes that dictate how the White Rabbit should animate down the hole:</p>
82
+
<p>In the <ahref="https://codepen.io/rachelnabors/pen/eJyWzm/?editors=0010">Follow the White Rabbit example</a>, the <code>KeyframeEffect</code> constructor is used to create a set of keyframes that dictate how the White Rabbit should animate down the hole:</p>
78
83
79
-
<preclass="brush: js">var rabbitDownKeyframes = new KeyframeEffect(
84
+
<preclass="brush: js">var rabbitDownKeyframes = new KeyframeEffect(
0 commit comments