(tagName, props)
| 15191 | } |
| 15192 | |
| 15193 | function isCustomComponent(tagName, props) { |
| 15194 | if (tagName.indexOf('-') === -1) { |
| 15195 | return typeof props.is === 'string'; |
| 15196 | } |
| 15197 | switch (tagName) { |
| 15198 | // These are reserved SVG and MathML elements. |
| 15199 | // We don't mind this whitelist too much because we expect it to never grow. |
| 15200 | // The alternative is to track the namespace in a few places which is convoluted. |
| 15201 | // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts |
| 15202 | case 'annotation-xml': |
| 15203 | case 'color-profile': |
| 15204 | case 'font-face': |
| 15205 | case 'font-face-src': |
| 15206 | case 'font-face-uri': |
| 15207 | case 'font-face-format': |
| 15208 | case 'font-face-name': |
| 15209 | case 'missing-glyph': |
| 15210 | return false; |
| 15211 | default: |
| 15212 | return true; |
| 15213 | } |
| 15214 | } |
| 15215 | |
| 15216 | // When adding attributes to the HTML or SVG whitelist, be sure to |
| 15217 | // also add them to this module to ensure casing and incorrect name |
no outgoing calls
no test coverage detected