Closed trueqbit closed 6 years ago
maybe it should be: set AttrX to ValueY in the subtree of the given tag
I don't think that is do-able in any straightforward and robust way.
You cannot observe an HTML attribute. JsViews observability is for observable changes to data. An HTML form disabled attribute/property can be changed directly with out triggering any cross-browser mutation event.
If your scenario involves having the form disabled state be data-driven, then you can observe that change and data-bind all form input elements disabled properties to the same data event.
Closing this, as not do-able.
Sometimes, a nice feature would be to disable all form elements. This might not seem useful at first, but when you have a big or complex form, then data-binding the
disabled
attribute at every input element, or conditionally showing alternatives soon becomes impractical and error-prone.So, the idea is that every data-bound input element would observe a disabled parent (form).
Would this be something that could be easily achieved by the jsviews library?