engine
engine copied to clipboard
Consider to support explicitly addressing individual text children from view models
Given the following markup:
<p property="example">
Hello <b>world</b> out there!
</p>
It might be convenient, to have a means to explicitly address the "\nHello " or " out there!\n" children of <p>.
When calling example on the view model, we could pass in an array of strings instead of the full text ("Hello world out there"). which is rather useless in this case as it contains the child <b>'s content as well.
If the returned type is a TextCollection, we could replace the individual text children. If an array of TextCollections is returned, we could loop, duplicating <p>.
The behavior for the other already supported return types does not change.