aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/index.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/index.ts b/src/index.ts
index b737865..acbb360 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -89,7 +89,9 @@ const getEvalActions = (
},
setAttribute: async (id, name, value) => {
const $el = id ? document.getElementById(id) : $element
- if (value) {
+ if (name === 'value') {
+ ;($el as any).value = value
+ } else if (value) {
$el?.setAttribute(name, value)
} else {
$el?.removeAttribute(name)