NEWS: Welcome to my new homepage! <3

Added property binding - figure - Unnamed repository; edit this file 'description' to name the repository.

figure

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 0afd01d29305b94ca2cbf1157bd77ff9fcf67c03
parent c42e8026ff612258848707a8fb37ab6a0a6f194c
Author: typable <contact@typable.dev>
Date:   Fri, 18 Nov 2022 09:30:47 +0100

Added property binding

Diffstat:
Mlib.js | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/lib.js b/lib.js @@ -111,6 +111,10 @@ const render = (node, refs) => { const event = match[1]; attributes[`on${event.substring(0, 1).toUpperCase()}${event.substring(1)}`] = refs[ref]; } + else if((match = /^\[(\w+)\]$/.exec(key)) !== null) { + const event = match[1]; + attributes['value'] = refs[ref]; + } else { attributes[key] = refs[ref]; }