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

Method _insertElement

packages/parse5/lib/parser/index.ts:440–445  ·  view source on GitHub ↗

@protected

(token: TagToken, namespaceURI: NS)

Source from the content-addressed store, hash-verified

438
439 /** @protected */
440 _insertElement(token: TagToken, namespaceURI: NS): void {
441 const element = this.treeAdapter.createElement(token.tagName, namespaceURI, token.attrs);
442
443 this._attachElementToTree(element, token.location);
444 this.openElements.push(element, token.tagID);
445 }
446
447 /** @protected */
448 _insertFakeElement(tagName: string, tagID: $): void {

Callers 15

_switchToTextParsingMethod · 0.95
startTagBeforeHtmlFunction · 0.80
startTagBeforeHeadFunction · 0.80
startTagInHeadFunction · 0.80
startTagAfterHeadFunction · 0.80
framesetStartTagInBodyFunction · 0.80
addressStartTagInBodyFunction · 0.80
preStartTagInBodyFunction · 0.80
formStartTagInBodyFunction · 0.80
listItemStartTagInBodyFunction · 0.80

Calls 3

_attachElementToTreeMethod · 0.95
createElementMethod · 0.80
pushMethod · 0.80

Tested by

no test coverage detected