diff options
| author | Akshay Nair <phenax5@gmail.com> | 2023-08-13 17:35:19 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2023-08-13 17:35:19 +0530 |
| commit | 95602d1b1ac5668772d5d400270b4209ee19057b (patch) | |
| tree | 21a5871bd0295cf311fb53e262658c0d7605a397 /src/index.ts | |
| parent | 2c2bf0136a92b7ca49e7df952a44d9000a07fa8b (diff) | |
| download | css-everything-95602d1b1ac5668772d5d400270b4209ee19057b.tar.gz css-everything-95602d1b1ac5668772d5d400270b4209ee19057b.zip | |
fix: handles value attribute for set-attr
Diffstat (limited to '')
| -rw-r--r-- | src/index.ts | 4 |
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) |
