engine icon indicating copy to clipboard operation
engine copied to clipboard

Consider to support explicitly addressing individual text children from view models

Open theseer opened this issue 2 years ago • 0 comments

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.

theseer avatar Nov 05 '23 00:11 theseer