MCPcopy
hub / github.com/webpack/webpack / getContentModeForTag

Function getContentModeForTag

lib/html/syntax.js:291–309  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

289 * @returns {number} content mode state for this tag, or STATE_DATA
290 */
291const getContentModeForTag = (name) => {
292 switch (name) {
293 case "textarea":
294 case "title":
295 return STATE_RCDATA;
296 case "style":
297 case "xmp":
298 case "iframe":
299 case "noembed":
300 case "noframes":
301 return STATE_RAWTEXT;
302 case "script":
303 return STATE_SCRIPT_DATA;
304 case "plaintext":
305 return STATE_PLAINTEXT;
306 default:
307 return STATE_DATA;
308 }
309};
310
311/**
312 * Case-insensitive comparison of `input[start..end)` to a lowercase ASCII

Callers 1

walkHtmlTokensFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected