Skip to content

Commit de131e4

Browse files
committed
Attempt to set read-only props using attr.
Fixes #2732
1 parent d548a5a commit de131e4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/internal/dom.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,11 @@ export function set_attributes(node, attributes) {
9393
if (key === 'style') {
9494
node.style.cssText = attributes[key];
9595
} else if (key in node) {
96-
node[key] = attributes[key];
96+
try {
97+
node[key] = attributes[key];
98+
} catch (e) {
99+
attr(node, key, attributes[key]);
100+
}
97101
} else {
98102
attr(node, key, attributes[key]);
99103
}

0 commit comments

Comments
 (0)