Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[web-animations-1] Add parameter to getAnimations for getting animations in descendants too #2058

Closed
birtles opened this issue Dec 5, 2017 · 9 comments · Fixed by #3902
Closed

Comments

@birtles
Copy link
Contributor

birtles commented Dec 5, 2017

From @birtles on March 17, 2016 0:48

As discussed and minuted here: The ideas we came up with are here: https://docs.google.com/document/d/1lQbgJ0fZYGn1_qboj59G-MOILK33z4kmBdjgtSHF2gA/edit#heading=h.cioj28lsgoa2

A more concrete elaboration on that proposal is described here:
https://bugzilla.mozilla.org/show_bug.cgi?id=1254761#c0

Copied from original issue: w3c/web-animations#146

@birtles
Copy link
Contributor Author

birtles commented Dec 5, 2017

I discussed this with Antoine at one point and I think we were leaning against adding this.

@birtles
Copy link
Contributor Author

birtles commented Dec 5, 2017

From @graouts on November 21, 2017 8:52

Yes, I don't think this is warranted, JavaScript can be efficiently used to filter results of getAnimations() calls. I suggest we close this.

@birtles
Copy link
Contributor Author

birtles commented Dec 5, 2017

Yeah I agree about dropping the filter feature. I wonder if we might still want something along the lines of { subtree: true } for getting all animations from a node and its descendants (like MutationObservers). We've actually implemented that in Firefox but only turned it on for internal users--we use it for our DevTools and for UI code.

If we do go ahead with that then we might want something more extensible than a bool (although at the same time aligning with MutationObserver is nice). I'm not sure if we'll eventually need a third value for crossing shadow DOM boundaries or if that's even possible?

@annevk
Copy link
Member

annevk commented Feb 22, 2018

Please don't cross shadow tree boundaries if that ends up exposing information about the shadow tree.

@birtles
Copy link
Contributor Author

birtles commented May 7, 2019

@annevk Would it be ok to expose animations from a shadow tree if the shadow root is open?

@tabatkins
Copy link
Member

We don't generally draw a distinction there, I think.

@annevk
Copy link
Member

annevk commented May 7, 2019

Yeah, the main difference with open is for Element#shadowRoot and Event#composedPath(), but encapsulation in general should still hold.

@birtles
Copy link
Contributor Author

birtles commented May 7, 2019

Ok, I'm assuming that encapsulation applies even if the author were to explicitly pass a flag such as { composed: true } (as suggested here).

@annevk
Copy link
Member

annevk commented May 8, 2019

Yeah, they should not be able to access things inside the tree that way. It might be acceptable if they have a handle on the applicable ShadowRoot objects, but that should really be discussed as a pattern on w3c/webcomponents first as nothing is using that yet (it's floating around as an option for selection).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants