Open maberer opened 8 years ago
People might use the following statement with multiple w-bind
. This would (at least) not cause strange effects (since the two sections are mutual exclusive...) - but I think it is bad practice nevertheless...
<if test="isLink">
<a w-bind> ... </a>
</if>
<else>
<button w-bind> ... </button>
</else>
We should break compiling a template if it contains more than 1
w-bind
attribute. There is probably no good reason (bad practice) to to that (and often a mistake if not aware)... additionally, it could cause strange effects like missing events in a parent widget.I ran into the problem when having the following bad template (extremely simplified):
Be aware of the 2
w-bind
attributes!further having (in the widget implementation code):
PROBLEM: The "submit" event of the form emitted by this widget would never reach the parent widget.