@@ -192,6 +192,7 @@ urlPrefix: https://drafts.csswg.org/css-style-attr/; type: dfn; spec: css-style-
192
192
<pre class="link-defaults">
193
193
spec:dom; type:interface; text:EventTarget
194
194
spec:dom; type:interface; text:Event
195
+ spec:dom; type:dfn; for:/; text:shadow root
195
196
spec:css-values-3; type:type; text:<ident>
196
197
spec:css-backgrounds-3; type:property;
197
198
text:border-width
@@ -5851,13 +5852,12 @@ animation.play();</pre>
5851
5852
5852
5853
<h3 id="extensions-to-the-document-interface">Extensions to the <code>Document</code> interface</h3>
5853
5854
5854
- The following extensions are made to the <a lt=' Document' interface>Document
5855
- interface</a> defined in [[!DOM]] .
5855
+ The following extensions are made to the {{ Document}} interface defined in
5856
+ [[!DOM]] .
5856
5857
5857
5858
<pre class="idl">
5858
5859
partial interface Document {
5859
5860
readonly attribute DocumentTimeline timeline;
5860
- sequence<Animation> getAnimations();
5861
5861
};
5862
5862
</pre>
5863
5863
@@ -5869,13 +5869,26 @@ partial interface Document {
5869
5869
5870
5870
</div>
5871
5871
5872
+ <h3 id="extensions-to-the-documentorshadowroot-interface-mixin">Extensions to the <code>DocumentOrShadowRoot</code> interface mixin</h3>
5873
+
5874
+ The following extensions are made to the {{DocumentOrShadowRoot}} interface
5875
+ mixin defined in [[!DOM]] .
5876
+
5877
+ <pre class="idl">
5878
+ partial interface mixin DocumentOrShadowRoot {
5879
+ sequence<Animation> getAnimations();
5880
+ };
5881
+ </pre>
5882
+
5872
5883
<div class="methods">
5873
5884
5874
- : <dfn method for=Document lt='getAnimations()'>
5885
+ : <dfn method for=DocumentOrShadowRoot lt='getAnimations()'>
5875
5886
sequence<Animation> getAnimations()</dfn>
5876
5887
:: Returns the set of [=relevant=] {{Animation}} objects
5877
5888
that have an associated <a>target effect</a>
5878
- whose <a>target element</a> is a <a>descendant</a> of the document.
5889
+ whose <a>target element</a> is a <a>descendant</a> of
5890
+ the [=document=] or [=shadow root=]
5891
+ on which this method is called.
5879
5892
5880
5893
The returned list is sorted using the composite order described
5881
5894
for the associated <a>animations</a> of effects in [[#the-effect-stack]] .
@@ -5887,6 +5900,7 @@ partial interface Document {
5887
5900
5888
5901
</div>
5889
5902
5903
+
5890
5904
<h3 id="extensions-to-the-element-interface">Extensions to the <code>Element</code> interface</h3>
5891
5905
5892
5906
Since DOM Elements may be the target of an animation,
@@ -5901,7 +5915,6 @@ This allows the following kind of usage.
5901
5915
<div class="example"><pre class="lang-javascript">
5902
5916
elem.animate({ color: 'red' }, 2000);</pre></div>
5903
5917
5904
-
5905
5918
<h3 id="extensions-to-the-pseudoelement-interface">Extensions to the <code>CSSPseudoElement</code> interface</h3>
5906
5919
5907
5920
Since <a>keyframe effects</a> may also target pseudo-elements, the
@@ -6219,6 +6232,9 @@ The following changes have been made since the <a
6219
6232
* Added an {{Animatable/getAnimations(options)/options}} parameter to the
6220
6233
{{Animatable/getAnimations()}} method on the {{Animatable}} interface
6221
6234
to allow fetching all animations on descendants of a particular element.
6235
+ * Moved the definition of {{DocumentOrShadowRoot/getAnimations()}} from the
6236
+ {{Document}} interface to the {{DocumentOrShadowRoot}} interface mixin
6237
+ so that it can be used with {{ShadowRoot}} s as well.
6222
6238
6223
6239
The <a
6224
6240
href="https://github.com/w3c/csswg-drafts/commits/master/web-animations-1"> changelog</a>
0 commit comments