- From: Brian Birtles via GitHub <sysbot+gh@w3.org>
- Date: Wed, 22 May 2019 05:47:53 +0000
- To: public-css-archive@w3.org
birtles has just created a new issue for https://github.com/w3c/csswg-drafts:
== [web-animations-1] Add `getAnimations()` to `ShadowRoot` ==
Currently the following will return an empty array:
```js
const shadow = host.attachShadow({ mode: 'open' });
const elem = document.createElement('div');
shadow.appendChild(elem);
elem.animate(...);
// Get the animations from the host
// --> Returns empty array because getAnimations does not cross shadow-tree boundaries
host.getAnimations({ subtree: true });
```
To make working with shadow trees easier we could add:
```webidl
partial interface ShadowRoot {
sequence<Animation> getAnimations();
};
```
(Or should we add this to `DocumentFragment` instead?)
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3951 using your GitHub account
Received on Wednesday, 22 May 2019 05:47:55 UTC