I'm trying to insert dynamic behaviour in a css property of an existing element. Of course I could remake the element manually and insert the behaviour via an insertDomB over the existing element, but I was wondering if there was another way.
I've tried this:
insertValueB(liftB(function(v){return'height:'+v+'px;';},extractValueB('thickness')),'thickness-example','style')
which would make the style property of the element with ID border-example dynamic. However this does not work for some reason, it is as if the style property cannot be changed like this.
So I thought perhaps I need to change it using the w3 style name-attributes:
insertValueB(liftB(function(v){return{height:v+'px'}},extractValueB('thickness')), 'thickness-example','style');
=> Error: "deepDynamicUpdate: dynamic collections not supported"
Which I find a weird error since valueNow() of this extractedValue behaviour is no behaviour but simply a number.
Which brings me to my final question: is there no way to go deeper in the chain to insert behaviour values:
insertStyleB(prop) ~= insertValueB(behaviour,elem,style.prop)?
Any ideas / suggestions? I've tried looking at the code for insertValueB but I don't entirely get how the indexing works in dom elements so the code is hard for me to read.
Kind regards
Ben