MCPcopy Index your code
hub / github.com/microsoft/SandDance / isCustomComponent

Function isCustomComponent

docs/external/js/react-dom.development.js:4888–4911  ·  view source on GitHub ↗
(tagName, props)

Source from the content-addressed store, hash-verified

4886 }
4887
4888 function isCustomComponent(tagName, props) {
4889 if (tagName.indexOf('-') === -1) {
4890 return typeof props.is === 'string';
4891 }
4892
4893 switch (tagName) {
4894 // These are reserved SVG and MathML elements.
4895 // We don't mind this whitelist too much because we expect it to never grow.
4896 // The alternative is to track the namespace in a few places which is convoluted.
4897 // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts
4898 case 'annotation-xml':
4899 case 'color-profile':
4900 case 'font-face':
4901 case 'font-face-src':
4902 case 'font-face-uri':
4903 case 'font-face-format':
4904 case 'font-face-name':
4905 case 'missing-glyph':
4906 return false;
4907
4908 default:
4909 return true;
4910 }
4911 }
4912
4913 // When adding attributes to the HTML or SVG whitelist, be sure to
4914 // also add them to this module to ensure casing and incorrect name

Callers 6

validatePropertiesFunction · 0.85
validateProperties$2Function · 0.85
createElementFunction · 0.85
setInitialPropertiesFunction · 0.85
updatePropertiesFunction · 0.85
diffHydratedPropertiesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected