Skip to content

Commit 792453b

Browse files
authored
[web-animations-1] Move definition of getAnimations from Document to DocumentOrShadowRoot (#3959)
This fixes #3951.
1 parent 177816d commit 792453b

File tree

1 file changed

+22
-6
lines changed

1 file changed

+22
-6
lines changed

web-animations-1/Overview.bs

+22-6
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ urlPrefix: https://drafts.csswg.org/css-style-attr/; type: dfn; spec: css-style-
192192
<pre class="link-defaults">
193193
spec:dom; type:interface; text:EventTarget
194194
spec:dom; type:interface; text:Event
195+
spec:dom; type:dfn; for:/; text:shadow root
195196
spec:css-values-3; type:type; text:<ident>
196197
spec:css-backgrounds-3; type:property;
197198
text:border-width
@@ -5851,13 +5852,12 @@ animation.play();</pre>
58515852

58525853
<h3 id="extensions-to-the-document-interface">Extensions to the <code>Document</code> interface</h3>
58535854

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]].
58565857

58575858
<pre class="idl">
58585859
partial interface Document {
58595860
readonly attribute DocumentTimeline timeline;
5860-
sequence&lt;Animation&gt; getAnimations();
58615861
};
58625862
</pre>
58635863

@@ -5869,13 +5869,26 @@ partial interface Document {
58695869

58705870
</div>
58715871

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&lt;Animation&gt; getAnimations();
5880+
};
5881+
</pre>
5882+
58725883
<div class="methods">
58735884

5874-
: <dfn method for=Document lt='getAnimations()'>
5885+
: <dfn method for=DocumentOrShadowRoot lt='getAnimations()'>
58755886
sequence&lt;Animation&gt; getAnimations()</dfn>
58765887
:: Returns the set of [=relevant=] {{Animation}} objects
58775888
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.
58795892

58805893
The returned list is sorted using the composite order described
58815894
for the associated <a>animations</a> of effects in [[#the-effect-stack]].
@@ -5887,6 +5900,7 @@ partial interface Document {
58875900

58885901
</div>
58895902

5903+
58905904
<h3 id="extensions-to-the-element-interface">Extensions to the <code>Element</code> interface</h3>
58915905

58925906
Since DOM Elements may be the target of an animation,
@@ -5901,7 +5915,6 @@ This allows the following kind of usage.
59015915
<div class="example"><pre class="lang-javascript">
59025916
elem.animate({ color: 'red' }, 2000);</pre></div>
59035917

5904-
59055918
<h3 id="extensions-to-the-pseudoelement-interface">Extensions to the <code>CSSPseudoElement</code> interface</h3>
59065919

59075920
Since <a>keyframe effects</a> may also target pseudo-elements, the
@@ -6219,6 +6232,9 @@ The following changes have been made since the <a
62196232
* Added an {{Animatable/getAnimations(options)/options}} parameter to the
62206233
{{Animatable/getAnimations()}} method on the {{Animatable}} interface
62216234
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.
62226238

62236239
The <a
62246240
href="https://github.com/w3c/csswg-drafts/commits/master/web-animations-1">changelog</a>

0 commit comments

Comments
 (0)