(tagName, props)
| 15156 | } |
| 15157 | |
| 15158 | function isCustomComponent(tagName, props) { |
| 15159 | if (tagName.indexOf('-') === -1) { |
| 15160 | return typeof props.is === 'string'; |
| 15161 | } |
| 15162 | switch (tagName) { |
| 15163 | // These are reserved SVG and MathML elements. |
| 15164 | // We don't mind this whitelist too much because we expect it to never grow. |
| 15165 | // The alternative is to track the namespace in a few places which is convoluted. |
| 15166 | // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts |
| 15167 | case 'annotation-xml': |
| 15168 | case 'color-profile': |
| 15169 | case 'font-face': |
| 15170 | case 'font-face-src': |
| 15171 | case 'font-face-uri': |
| 15172 | case 'font-face-format': |
| 15173 | case 'font-face-name': |
| 15174 | case 'missing-glyph': |
| 15175 | return false; |
| 15176 | default: |
| 15177 | return true; |
| 15178 | } |
| 15179 | } |
| 15180 | |
| 15181 | // When adding attributes to the HTML or SVG whitelist, be sure to |
| 15182 | // also add them to this module to ensure casing and incorrect name |
no outgoing calls
no test coverage detected