refactor(ivy): update specs to make use of the element() instruction (#25173)

PR Close #25173
This commit is contained in:
Victor Berchet
2018-07-27 14:28:22 -07:00
committed by Igor Minar
parent f82b6b2ed7
commit 89e8b6fc0e
17 changed files with 257 additions and 502 deletions

View File

@ -635,9 +635,11 @@ export function namespaceHTML() {
* @param localRefs A set of local reference bindings on the element.
*/
export function element(
index: number, name: string, attrs?: TAttributes | null, localRefs?: string[] | null): void {
elementStart(index, name, attrs, localRefs);
index: number, name: string, attrs?: TAttributes | null,
localRefs?: string[] | null): RElement {
const rElement = elementStart(index, name, attrs, localRefs);
elementEnd();
return rElement;
}
/**
@ -1113,7 +1115,7 @@ export function storeCleanupFn(view: LViewData, cleanupFn: Function): void {
}
/** Mark the end of the element. */
export function elementEnd() {
export function elementEnd(): void {
if (isParent) {
isParent = false;
} else {