MCPcopy Index your code
hub / github.com/angular/angular / execute

Method execute

packages/compiler/src/typecheck/ops/element.ts:37–49  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35 }
36
37 override execute(): TcbExpr {
38 const id = this.tcb.allocateId();
39 const idNode = new TcbExpr(id);
40 idNode.addParseSpanInfo(this.element.startSourceSpan || this.element.sourceSpan);
41
42 // Add the declaration of the element using document.createElement.
43 const initializer = new TcbExpr(`document.createElement("${this.element.name}")`);
44 initializer.addParseSpanInfo(this.element.startSourceSpan || this.element.sourceSpan);
45 const stmt = new TcbExpr(`var ${idNode.print()} = ${initializer.print()}`);
46 stmt.addParseSpanInfo(this.element.startSourceSpan || this.element.sourceSpan);
47 this.scope.addStatement(stmt);
48 return idNode;
49 }
50}

Callers

nothing calls this directly

Calls 4

addParseSpanInfoMethod · 0.95
printMethod · 0.95
allocateIdMethod · 0.80
addStatementMethod · 0.80

Tested by

no test coverage detected