Files
JoostK 1a4b489692 perf(animations): improve algorithm to balance animation namespaces (#45113)
The prior approach would consider all existing namespaces from back to front
to find the one that's the closest ancestor for a given host element. An
expensive `contains` operation was used which needed to traverse all the
way up the document root _for each existing namespace_. This commit implements
an optimization where the closest namespace is found by traversing up from
the host element, avoiding repeated DOM traversal.

Closes #45055

PR Close #45113
2022-02-18 13:44:44 -08:00

2.2 KiB

API Report File for "@angular/animations_browser_testing"

Do not edit this file. It is a report generated by API Extractor.


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)
    getParentElement(element: unknown): unknown;
    // (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)