a63cda21 by Adam Heath

Remove special react handling from html, it has been managed fix

fixAttributes in react.
1 parent 2d8750b4
......@@ -356,12 +356,6 @@ export const createAdjuster = (adjustments = {}) => {
return adjuster
}
const reactAttributeMap = {
'class': 'className',
'srcset': 'srcSet',
'maxlength': 'maxLength',
}
class NodeProxyHandler {
#options
#cache
......@@ -379,15 +373,7 @@ class NodeProxyHandler {
if (!origValue) return origValue
switch (prop) {
case 'attributes':
return this.#cache[ prop ] = (origValue ? Object.fromEntries(Object.entries(origValue).map(([ key, value ]) => {
const decoded = decode(value)
if (this.#options.react) {
const { [ key ]: newKey } = reactAttributeMap
if (newKey) return [ newKey, decoded ]
}
return [ key, decoded ]
})) : origValue)
return newValue
return this.#cache[ prop ] = origValue
case 'parent':
return this.#parent
case 'children':
......
......@@ -25,9 +25,6 @@ export const fixAttributes = (attributes) => {
if (maxLength !== undefined) result.maxLength = maxLength
if (htmlFor !== undefined) result.htmlFor = htmlFor
return result
return Object.fromEntries(Object.entries(result).map(([ key, value ]) => {
return [ key, decode(value) ]
}))
}
export const CreateReplacement = (Element, propsOrCreator) => (matchOptions) => {
......