html-dom-parser
Version:
HTML to DOM parser.
48 lines (47 loc) • 1.05 kB
JavaScript
//#region src/client/constants.ts
/**
* SVG elements are case-sensitive.
*
* @see https://developer.mozilla.org/docs/Web/SVG/Element#svg_elements_a_to_z
*/
const CASE_SENSITIVE_TAG_NAMES = [
"animateMotion",
"animateTransform",
"clipPath",
"feBlend",
"feColorMatrix",
"feComponentTransfer",
"feComposite",
"feConvolveMatrix",
"feDiffuseLighting",
"feDisplacementMap",
"feDropShadow",
"feFlood",
"feFuncA",
"feFuncB",
"feFuncG",
"feFuncR",
"feGaussianBlur",
"feImage",
"feMerge",
"feMergeNode",
"feMorphology",
"feOffset",
"fePointLight",
"feSpecularLighting",
"feSpotLight",
"feTile",
"feTurbulence",
"foreignObject",
"linearGradient",
"radialGradient",
"textPath"
];
const CASE_SENSITIVE_TAG_NAMES_MAP = CASE_SENSITIVE_TAG_NAMES.reduce((accumulator, tagName) => {
accumulator[tagName.toLowerCase()] = tagName;
return accumulator;
}, {});
//#endregion
exports.CASE_SENSITIVE_TAG_NAMES = CASE_SENSITIVE_TAG_NAMES;
exports.CASE_SENSITIVE_TAG_NAMES_MAP = CASE_SENSITIVE_TAG_NAMES_MAP;
//# sourceMappingURL=constants.js.map