From 4b845e44c05ff58a3e4ebf6d314413d6caaab51c Mon Sep 17 00:00:00 2001 From: Sasha Firsov Date: Fri, 19 Apr 2024 10:13:58 -0700 Subject: [PATCH] value attribute change missing fix --- custom-element.js | 5 +- demo/data-slices.html | 113 +++++++++++++++++------------------------- 2 files changed, 49 insertions(+), 69 deletions(-) diff --git a/custom-element.js b/custom-element.js index 7cdbdb8..7c2b97c 100644 --- a/custom-element.js +++ b/custom-element.js @@ -417,7 +417,10 @@ export function mergeAttr( from, to ) return } for( let a of from.attributes) - a.namespaceURI? to.setAttributeNS( a.namespaceURI, a.name, a.value ) : to.setAttribute( a.name, a.value ) + { a.namespaceURI? to.setAttributeNS( a.namespaceURI, a.name, a.value ) : to.setAttribute( a.name, a.value ) + if( a.name === 'value') + to.value = a.value + } } export function assureUnique(n, id=0) { diff --git a/demo/data-slices.html b/demo/data-slices.html index c611b0f..e2b4c6e 100644 --- a/demo/data-slices.html +++ b/demo/data-slices.html @@ -19,7 +19,45 @@

Data slices propagation by events.

- + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -