1
0
mirror of https://github.com/jaandrle/deka-dom-el synced 2024-11-21 23:39:37 +01:00

📝 add comment to processReactiveAttribute

This commit is contained in:
Jan Andrle 2023-09-11 18:30:06 +02:00
parent 62a3b1ed35
commit 1cb1a8420c
Signed by: jaandrle
GPG Key ID: B3A25AED155AFFAB

View File

@ -87,10 +87,11 @@ export const signals_config= {
isTextContent(attributes){ isTextContent(attributes){
return typeOf(attributes)==="string" || ( isSignal(attributes) && typeOf(valueOfSignal(attributes))==="string" ); return typeOf(attributes)==="string" || ( isSignal(attributes) && typeOf(valueOfSignal(attributes))==="string" );
}, },
processReactiveAttribute(_, key, attrS, assignNth){ processReactiveAttribute(_, key, attrs, assignNth){
if(!isSignal(attrS)) return attrS; //TODO DOC: once the signal is used as attribute, there is no reason to use assign again (if for some reason needed, use imperative listeners clear with `S.clear`)
addSignalListener(attrS, attr=> assignNth([ key, attr ])); if(!isSignal(attrs)) return attrs;
return attrS(); addSignalListener(attrs, attr=> assignNth([ key, attr ]));
return attrs();
} }
}; };