forked from angular/angular.js
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix($animateQueue): handle listeners on containers without a `.contai…
…ns()` method When registering an animation listener (via `$animate.on()`), the container's `.contains()` method was used to determine if the animated element is a child of the container. This resulted in errors in IE, when `document` was used as a container, because IE does not define `.contains()` on `Node`'s prototype (as prescribed by the spec), but on `HTMLElement`'s prototype instead. This is not an issue on other DOM elements, because they inherit from both `Node` and `HTMLElement`, but it is on `document`, which is not an instance of `HTMLElement`. This change provides a way to determine if the animated element is a child of the container, even if the latter does not have a `.contains()` method. Fixes angular#13548
- Loading branch information
Showing
2 changed files
with
30 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters