aboutsummaryrefslogtreecommitdiff
path: root/src/rx.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/rx.ts')
-rw-r--r--src/rx.ts10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/rx.ts b/src/rx.ts
index a83c915..221dcfc 100644
--- a/src/rx.ts
+++ b/src/rx.ts
@@ -463,11 +463,17 @@ function appendNode(base: Element, node: Node, lastAdded?: Node) {
}
function setAttribute(state: State, element: Element, key: string, attribute: AttributeValue) {
- if (attribute === undefined || attribute === false) {
+ if (attribute === undefined) {
// Do nothing
} else if (attribute === true) {
// @ts-ignore
- element[key] = "true"
+ element[key] = 'true'
+ } else if (attribute === false) {
+ // @ts-ignore
+ if (key in element) {
+ // @ts-ignore
+ element[key] = false
+ }
} else if (typeof attribute === "number") {
// @ts-ignore
element[key] = attribute.toString()