(name: string)
| 37 | const attrValidationCache: Record<string, boolean> = {} |
| 38 | |
| 39 | export function isSSRSafeAttrName(name: string): boolean { |
| 40 | if (attrValidationCache.hasOwnProperty(name)) { |
| 41 | return attrValidationCache[name] |
| 42 | } |
| 43 | const isUnsafe = unsafeAttrCharRE.test(name) |
| 44 | if (isUnsafe) { |
| 45 | console.error(`unsafe attribute name: ${name}`) |
| 46 | } |
| 47 | return (attrValidationCache[name] = !isUnsafe) |
| 48 | } |
| 49 | |
| 50 | export const propsToAttrMap: Record<string, string | undefined> = { |
| 51 | acceptCharset: 'accept-charset', |
no test coverage detected