(tagName, props)
| 15294 | } |
| 15295 | |
| 15296 | function isCustomComponent(tagName, props) { |
| 15297 | if (tagName.indexOf('-') === -1) { |
| 15298 | return typeof props.is === 'string'; |
| 15299 | } |
| 15300 | switch (tagName) { |
| 15301 | // These are reserved SVG and MathML elements. |
| 15302 | // We don't mind this whitelist too much because we expect it to never grow. |
| 15303 | // The alternative is to track the namespace in a few places which is convoluted. |
| 15304 | // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts |
| 15305 | case 'annotation-xml': |
| 15306 | case 'color-profile': |
| 15307 | case 'font-face': |
| 15308 | case 'font-face-src': |
| 15309 | case 'font-face-uri': |
| 15310 | case 'font-face-format': |
| 15311 | case 'font-face-name': |
| 15312 | case 'missing-glyph': |
| 15313 | return false; |
| 15314 | default: |
| 15315 | return true; |
| 15316 | } |
| 15317 | } |
| 15318 | |
| 15319 | // When adding attributes to the HTML or SVG whitelist, be sure to |
| 15320 | // also add them to this module to ensure casing and incorrect name |
no outgoing calls
no test coverage detected