Skip to content

Commit

Permalink
fixed: do not set readonly property.
Browse files Browse the repository at this point in the history
  • Loading branch information
cbbfcd committed Jun 16, 2022
1 parent 870ab76 commit 93245d7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/million/createElement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,13 @@ export const createElement = (vnode?: VNode | null, attachField = true): DOMNode
} else if (propName.charCodeAt(5) === COLON_CHAR) {
el.setAttributeNS(XLINK_NS, propName, String(propValue));
}
} else if (el[propName] !== undefined && !(el instanceof SVGElement)) {
} else if (
el[propName] !== undefined &&
!(el instanceof SVGElement) &&
propName !== "list" &&
propName !== "form" &&
propName in el
) {
el[propName] = propValue;
} else {
el.setAttribute(propName, String(propValue));
Expand Down

0 comments on commit 93245d7

Please sign in to comment.