MCPcopy
hub / github.com/angular/angular / visitElement

Method visitElement

packages/compiler/test/ml_parser/ast_spec_utils.ts:42–56  ·  view source on GitHub ↗
(element: html.Element)

Source from the content-addressed store, hash-verified

40 constructor(private includeSourceSpan: boolean) {}
41
42 visitElement(element: html.Element): any {
43 const res = this._appendContext(element, [html.Element, element.name, this.elDepth++]);
44 if (element.isSelfClosing) {
45 res.push('#selfClosing');
46 }
47 if (this.includeSourceSpan) {
48 res.push(element.startSourceSpan.toString() ?? null);
49 res.push(element.endSourceSpan?.toString() ?? null);
50 }
51 this.result.push(res);
52 html.visitAll(this, element.attrs);
53 html.visitAll(this, element.directives);
54 html.visitAll(this, element.children);
55 this.elDepth--;
56 }
57
58 visitAttribute(attribute: html.Attribute): any {
59 const valueTokens = attribute.valueTokens ?? [];

Callers

nothing calls this directly

Calls 4

_appendContextMethod · 0.95
toStringMethod · 0.65
pushMethod · 0.45
visitAllMethod · 0.45

Tested by

no test coverage detected