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

Method pop

packages/parse5/lib/parser/open-element-stack.ts:96–106  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

94 }
95
96 pop(): void {
97 const popped = this.current;
98 if (this.tmplCount > 0 && this._isInTemplate()) {
99 this.tmplCount--;
100 }
101
102 this.stackTop--;
103 this._updateCurrentElement();
104
105 this.handler.onItemPop(popped, true);
106 }
107
108 replace(oldElement: T['element'], newElement: T['element']): void {
109 const idx = this._indexOf(oldElement);

Callers 15

removeMethod · 0.95
constructorMethod · 0.80
endTagInHeadFunction · 0.80
tokenInHeadFunction · 0.80
endTagInHeadNoScriptFunction · 0.80
tokenInHeadNoScriptFunction · 0.80
optgroupStartTagInBodyFunction · 0.80
brEndTagInBodyFunction · 0.80

Calls 3

_isInTemplateMethod · 0.95
_updateCurrentElementMethod · 0.95
onItemPopMethod · 0.80

Tested by

no test coverage detected