I can’t speak to why the error is or is not thrown, but your further example gets at what’s actually happening the first instance: it’s not updating the value from the perspective of downstream consumers. When you do value={{this.name}}
on the input, but {{name}}
is not tracked, you’re basically setting it to that value once, but in a way that is disconnected from further updates. The event handling with {{on}}
sets that property on the backing class, but the input would update its value regardless—it’s just not reflected back into the backing class’ internal state unless you use {{on}}
or similar. It appears to “work” here simply because input
will happily go on doing its normal thing, entirely ignorant of the JS on the page.
I’m also curious why it isn’t triggering that error, though!