MCPcopy
hub / github.com/webpack/webpack / insertHtmlElement

Function insertHtmlElement

lib/html/syntax.js:4858–4868  ·  view source on GitHub ↗
(
		/** @type {string} */ tagName,
		/** @type {HtmlAttribute[]} */ attributes,
		/** @type {TagPos | null} */ pos
	)

Source from the content-addressed store, hash-verified

4856 };
4857
4858 const insertHtmlElement = (
4859 /** @type {string} */ tagName,
4860 /** @type {HtmlAttribute[]} */ attributes,
4861 /** @type {TagPos | null} */ pos
4862 ) => {
4863 const el = mkEl(tagName, NS_HTML, attributes, pos);
4864 const place = appropriatePlace();
4865 insertAtPlace(place, el);
4866 open.push(el);
4867 return el;
4868 };
4869
4870 const insertForeignElement = (
4871 /** @type {string} */ tagName,

Callers 5

buildHtmlAstFunction · 0.85
startTagInBodyFunction · 0.85
endTagInBodyFunction · 0.85
genericRawtextFunction · 0.85
genericRcdataFunction · 0.85

Calls 4

mkElFunction · 0.85
appropriatePlaceFunction · 0.85
insertAtPlaceFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected