(tagName, props)
| 15249 | } |
| 15250 | |
| 15251 | function isCustomComponent(tagName, props) { |
| 15252 | if (tagName.indexOf('-') === -1) { |
| 15253 | return typeof props.is === 'string'; |
| 15254 | } |
| 15255 | switch (tagName) { |
| 15256 | // These are reserved SVG and MathML elements. |
| 15257 | // We don't mind this whitelist too much because we expect it to never grow. |
| 15258 | // The alternative is to track the namespace in a few places which is convoluted. |
| 15259 | // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts |
| 15260 | case 'annotation-xml': |
| 15261 | case 'color-profile': |
| 15262 | case 'font-face': |
| 15263 | case 'font-face-src': |
| 15264 | case 'font-face-uri': |
| 15265 | case 'font-face-format': |
| 15266 | case 'font-face-name': |
| 15267 | case 'missing-glyph': |
| 15268 | return false; |
| 15269 | default: |
| 15270 | return true; |
| 15271 | } |
| 15272 | } |
| 15273 | |
| 15274 | // When adding attributes to the HTML or SVG whitelist, be sure to |
| 15275 | // also add them to this module to ensure casing and incorrect name |
no outgoing calls
no test coverage detected