* Asserts that the custom element name conforms to the spec. * * @param {!typeof SyntaxError} SyntaxError * @param {string} name
(SyntaxError, name)
| 52 | * @param {string} name |
| 53 | */ |
| 54 | function assertValidName(SyntaxError, name) { |
| 55 | if (!VALID_NAME.test(name) || INVALID_NAMES.includes(name)) { |
| 56 | throw new SyntaxError(`invalid custom element name "${name}"`); |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | /** |
| 61 | * Does win have a full Custom Elements registry? |
no test coverage detected