refactor(ivy): add element instruction, reducing output size (#24379)
- Adds an element instruction - Reduces size of compiled output slightly PR Close #24379
This commit is contained in:
@ -33,6 +33,7 @@ export {
|
||||
NH as ɵNH,
|
||||
NM as ɵNM,
|
||||
NS as ɵNS,
|
||||
Ee as ɵEe,
|
||||
L as ɵL,
|
||||
T as ɵT,
|
||||
V as ɵV,
|
||||
|
@ -44,6 +44,7 @@ export {
|
||||
containerRefreshStart as cR,
|
||||
containerRefreshEnd as cr,
|
||||
|
||||
element as Ee,
|
||||
elementAttribute as a,
|
||||
elementClass as k,
|
||||
elementClassNamed as kn,
|
||||
|
@ -573,6 +573,20 @@ export function namespaceHTML() {
|
||||
//// Element
|
||||
//////////////////////////
|
||||
|
||||
/**
|
||||
* Creates an empty element using {@link elementStart} and {@link elementEnd}
|
||||
*
|
||||
* @param index Index of the element in the data array
|
||||
* @param name Name of the DOM Node
|
||||
* @param attrs Statically bound set of attributes to be written into the DOM element on creation.
|
||||
* @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);
|
||||
elementEnd();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create DOM element. The instruction must later be followed by `elementEnd()` call.
|
||||
*
|
||||
|
@ -41,6 +41,7 @@ export const angularCoreEnv: {[name: string]: Function} = {
|
||||
'ɵNS': r3.NS,
|
||||
'ɵE': r3.E,
|
||||
'ɵe': r3.e,
|
||||
'ɵEe': r3.Ee,
|
||||
'ɵf0': r3.f0,
|
||||
'ɵf1': r3.f1,
|
||||
'ɵf2': r3.f2,
|
||||
|
Reference in New Issue
Block a user