fix(animations): fix internal jscompiler issue and AOT quoting (#13798)
CL #143630929 PR Close #13798
This commit is contained in:
parent
dc63cef10a
commit
c2aa981dd6
|
@ -402,8 +402,9 @@ function createViewTopLevelStmts(view: CompileView, targetStatements: o.Statemen
|
||||||
o.literal(view.component.template.ngContentSelectors.length),
|
o.literal(view.component.template.ngContentSelectors.length),
|
||||||
ViewEncapsulationEnum.fromValue(view.component.template.encapsulation),
|
ViewEncapsulationEnum.fromValue(view.component.template.encapsulation),
|
||||||
view.styles,
|
view.styles,
|
||||||
o.literalMap(view.animations.map(
|
o.literalMap(
|
||||||
(entry): [string, o.Expression] => [entry.name, entry.fnExp])),
|
view.animations.map((entry): [string, o.Expression] => [entry.name, entry.fnExp]),
|
||||||
|
null, true),
|
||||||
]))
|
]))
|
||||||
.toDeclStmt(o.importType(createIdentifier(Identifiers.RenderComponentType))));
|
.toDeclStmt(o.importType(createIdentifier(Identifiers.RenderComponentType))));
|
||||||
}
|
}
|
||||||
|
|
|
@ -96,7 +96,9 @@ export class WebAnimationsPlayer implements AnimationPlayer {
|
||||||
|
|
||||||
/** @internal */
|
/** @internal */
|
||||||
_triggerWebAnimation(element: any, keyframes: any[], options: any): DomAnimatePlayer {
|
_triggerWebAnimation(element: any, keyframes: any[], options: any): DomAnimatePlayer {
|
||||||
return <DomAnimatePlayer>element.animate(keyframes, options);
|
// jscompiler doesn't seem to know animate is a native property because it's not fully
|
||||||
|
// supported yet across common browsers (we polyfill it for Edge/Safari) [CL #143630929]
|
||||||
|
return <DomAnimatePlayer>element['animate'](keyframes, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
get domPlayer() { return this._player; }
|
get domPlayer() { return this._player; }
|
||||||
|
|
Loading…
Reference in New Issue