mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
6df314f3d9
* The `TransitionAnimationEngine` had a fallback where it would store classes directly on a node if it doesn't have a `classList`. Presumably this is to support old browsers or if an animation is set on something like `ng-container`. This information was never used for anything since `containsClass` was never called. These changes simplify the logic to just a null check. * Deprecates the `AnimationDriver.matchesElement` method, because it was only used in one place which can be replaced with `classList.contains`. We can't remove the method completely, because `AnimationDriver` is a public API. We also can't turn it into a method on the base class in order to remove it from the sub-classes, because it can break apps using `noImplicitOverride` while extending `AnimationDriver`. PR Close #44378
74 lines
2.2 KiB
Markdown
74 lines
2.2 KiB
Markdown
## API Report File for "@angular/animations_browser_testing"
|
|
|
|
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
|
|
```ts
|
|
|
|
import { AnimationDriver } from '@angular/animations/browser';
|
|
import { AnimationPlayer } from '@angular/animations';
|
|
import { NoopAnimationPlayer } from '@angular/animations';
|
|
import { ɵStyleData } from '@angular/animations';
|
|
|
|
// @public (undocumented)
|
|
export class MockAnimationDriver implements AnimationDriver {
|
|
// (undocumented)
|
|
animate(element: any, keyframes: {
|
|
[key: string]: string | number;
|
|
}[], duration: number, delay: number, easing: string, previousPlayers?: any[]): MockAnimationPlayer;
|
|
// (undocumented)
|
|
computeStyle(element: any, prop: string, defaultValue?: string): string;
|
|
// (undocumented)
|
|
containsElement(elm1: any, elm2: any): boolean;
|
|
// (undocumented)
|
|
static log: AnimationPlayer[];
|
|
// (undocumented)
|
|
matchesElement(_element: any, _selector: string): boolean;
|
|
// (undocumented)
|
|
query(element: any, selector: string, multi: boolean): any[];
|
|
// (undocumented)
|
|
validateStyleProperty(prop: string): boolean;
|
|
}
|
|
|
|
// @public (undocumented)
|
|
export class MockAnimationPlayer extends NoopAnimationPlayer {
|
|
constructor(element: any, keyframes: {
|
|
[key: string]: string | number;
|
|
}[], duration: number, delay: number, easing: string, previousPlayers: any[]);
|
|
// (undocumented)
|
|
beforeDestroy(): void;
|
|
// (undocumented)
|
|
currentSnapshot: ɵStyleData;
|
|
// (undocumented)
|
|
delay: number;
|
|
// (undocumented)
|
|
destroy(): void;
|
|
// (undocumented)
|
|
duration: number;
|
|
// (undocumented)
|
|
easing: string;
|
|
// (undocumented)
|
|
element: any;
|
|
// (undocumented)
|
|
finish(): void;
|
|
// (undocumented)
|
|
hasStarted(): boolean;
|
|
// (undocumented)
|
|
keyframes: {
|
|
[key: string]: string | number;
|
|
}[];
|
|
// (undocumented)
|
|
play(): void;
|
|
// (undocumented)
|
|
previousPlayers: any[];
|
|
// (undocumented)
|
|
previousStyles: {
|
|
[key: string]: string | number;
|
|
};
|
|
// (undocumented)
|
|
reset(): void;
|
|
}
|
|
|
|
// (No @packageDocumentation comment for this package)
|
|
|
|
```
|