Currently the following will return an empty array:
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:
partial interface ShadowRoot {
sequence<Animation> getAnimations();
};
(Or should we add this to DocumentFragment instead?)