Jinntec / Fore

Fore - declarative user interfaces in plain HTML
MIT License
80 stars 11 forks source link

fx-items errors when additional textnodes are present for label #246

Open JoernT opened 5 months ago

JoernT commented 5 months ago

Example: /demo/fx-control.html

<fx-control ref="selected" update-event="input">
                        <fx-items ref="instance('list')?*" class="widget">
                            <template>
                                  <span class="fx-checkbox">
                                    <input id="check" name="option" type="checkbox" value="{value}"/>
                         -->           <label>foo {name}</label>
                                  </span>
                            </template>
                        </fx-items>
                    </fx-control>

The additional 'foo' textnode will cause an error when evaluating the expression. Also lets the code run into a syntax error and throws browser out-of-state - need to completely reload in a private window to make Chrome behave again.