(nativeElement: Element, instruction: string)
| 54 | * Asserts a given native element is an actual Element node and not something like a comment node. |
| 55 | */ |
| 56 | export function assertElementNodes(nativeElement: Element, instruction: string) { |
| 57 | if ((nativeElement as Node).nodeType !== Node.ELEMENT_NODE) { |
| 58 | throw new RuntimeError( |
| 59 | RuntimeErrorCode.ANIMATE_INVALID_VALUE, |
| 60 | `'${instruction}' can only be used on an element node, got ${stringify((nativeElement as Node).nodeType)}`, |
| 61 | ); |
| 62 | } |
| 63 | } |
| 64 | |
| 65 | /** |
| 66 | * trackEnterClasses is necessary in the case of composition where animate.enter |
no test coverage detected
searching dependent graphs…