feat(ivy): add element instruction (#23899)
Adds a simplified element instruction that can be used if an element has no children. PR Close #23899
This commit is contained in:
@ -28,6 +28,7 @@ export {
|
||||
NC as ɵNC,
|
||||
C as ɵC,
|
||||
E as ɵE,
|
||||
Ee as ɵEe,
|
||||
L as ɵL,
|
||||
T as ɵT,
|
||||
V as ɵV,
|
||||
|
@ -50,6 +50,7 @@ export {
|
||||
elementEnd as e,
|
||||
elementProperty as p,
|
||||
elementStart as E,
|
||||
element as Ee,
|
||||
elementStyle as s,
|
||||
elementStyleNamed as sn,
|
||||
|
||||
|
@ -1032,6 +1032,15 @@ export function elementEnd() {
|
||||
queueLifecycleHooks(previousOrParentNode.tNode.flags, currentView);
|
||||
}
|
||||
|
||||
/** Marks the beginning and end of an element in one call. */
|
||||
export function element(
|
||||
index: number, name: string, attrs?: TAttributes | null | undefined,
|
||||
localRefs?: string[] | null | undefined): RElement {
|
||||
const relement = elementStart(index, name, attrs, localRefs);
|
||||
elementEnd();
|
||||
return relement;
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the value of removes an attribute on an Element.
|
||||
*
|
||||
|
@ -12,6 +12,7 @@ import {assertNotNull} from './assert';
|
||||
import {AttributeMarker, TAttributes, TNode, unusedValueExportToPlacateAjd as unused1} from './interfaces/node';
|
||||
import {CssSelector, CssSelectorList, NG_PROJECT_AS_ATTR_NAME, SelectorFlags, unusedValueExportToPlacateAjd as unused2} from './interfaces/projection';
|
||||
|
||||
|
||||
const unusedValueToPlacateAjd = unused1 + unused2;
|
||||
|
||||
function isCssClassMatching(nodeClassAttrVal: string, cssClassToMatch: string): boolean {
|
||||
|
Reference in New Issue
Block a user