MCPcopy
hub / github.com/inikulin/parse5 / push

Method push

packages/parse5/lib/parser/open-element-stack.ts:81–94  ·  view source on GitHub ↗
(element: T['element'], tagID: $)

Source from the content-addressed store, hash-verified

79
80 //Mutations
81 push(element: T['element'], tagID: $): void {
82 this.stackTop++;
83
84 this.items[this.stackTop] = element;
85 this.current = element;
86 this.tagIDs[this.stackTop] = tagID;
87 this.currentTagId = tagID;
88
89 if (this._isInTemplate()) {
90 this.tmplCount++;
91 }
92
93 this.handler.onItemPush(element, tagID, true);
94 }
95
96 pop(): void {
97 const popped = this.current;

Callers 15

documentWriteMethod · 0.80
emitDoctypeMethod · 0.80
emitStartTagMethod · 0.80
emitEndTagMethod · 0.80
emitTextMethod · 0.80
emitCommentMethod · 0.80
emitRawMethod · 0.80
appendChildFunction · 0.80
appendChildFunction · 0.80
adoptAttributesFunction · 0.80
_insertElementMethod · 0.80
_insertFakeElementMethod · 0.80

Calls 2

_isInTemplateMethod · 0.95
onItemPushMethod · 0.80

Tested by

no test coverage detected