angular-docs-cn/packages/animations
jeripeierSBB a99aa29040 fix(animations): allow animations on elements in the shadow DOM (#40134)
When determining whether to run an animation, the `TransitionAnimationPlayer`
checks to see if a DOM element is attached to the document. This is done by
checking to see if the element is "contained" by the document body node.

Previously, if the element was inside a shadow DOM, the engine would
determine that the element was not attached, even if the shadow DOM's
host was attached to the document. This commit updates the `containsElement()`
method on `AnimationDriver` implementations to also include shadow DOM
elements as being contained if their shadow host element is contained.

Further, when using CSS keyframes to trigger animations, the styling
was always added to the `head` element of the document, even for
animations on elements within a shadow DOM. This meant that those
elements never receive those styles and the animation would not run.
This commit updates the insertion of these styles so that they are added,
to the element's "root node", which is the nearest shadow DOM host, or the
`head` of the document if the element is not in a shadow DOM.

Closes #25672

PR Close #40134
2021-04-15 12:45:52 -07:00
..
browser fix(animations): allow animations on elements in the shadow DOM (#40134) 2021-04-15 12:45:52 -07:00
src fix(animations): implement getPosition in browser animation builder (#39983) 2020-12-08 16:24:41 -08:00
test fix(animations): implement getPosition in browser animation builder (#39983) 2020-12-08 16:24:41 -08:00
BUILD.bazel build: provide full paths to `ts_api_guardian_test_npm_package` and `ts_api_guardian_test` (#36034) 2020-03-12 09:49:00 -07:00
PACKAGE.md build(docs-infra): implement the 'package' API template (#24631) 2018-07-13 19:45:54 -04:00
index.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
package.json feat(animations): update supported range of node versions (#41544) 2021-04-14 09:40:17 -07:00
public_api.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00