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:
parent
62a3b1ed35
commit
1cb1a8420c
@ -87,10 +87,11 @@ export const signals_config= {
|
||||
isTextContent(attributes){
|
||||
return typeOf(attributes)==="string" || ( isSignal(attributes) && typeOf(valueOfSignal(attributes))==="string" );
|
||||
},
|
||||
processReactiveAttribute(_, key, attrS, assignNth){
|
||||
if(!isSignal(attrS)) return attrS;
|
||||
addSignalListener(attrS, attr=> assignNth([ key, attr ]));
|
||||
return attrS();
|
||||
processReactiveAttribute(_, key, attrs, assignNth){
|
||||
//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`)
|
||||
if(!isSignal(attrs)) return attrs;
|
||||
addSignalListener(attrs, attr=> assignNth([ key, attr ]));
|
||||
return attrs();
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user