When dot.span callls the function, it will indicate in an internal metadata structure that it is calling a function. Then when the function executes, for the first time, the property will learn to be bound to that html element.
The downside of this is that it may break the existing function syntax. This may honestly be the best (only) way to do it...
Ideal form:
Challenges:
this.myProp is evaluated before dot.span(). Also doesn't support calculated values. Very tricky to solve.
Option 1: Properties as a function.
When dot.span callls the function, it will indicate in an internal metadata structure that it is calling a function. Then when the function executes, for the first time, the property will learn to be bound to that html element.
The downside of this is that it may break the existing function syntax. This may honestly be the best (only) way to do it...
Here is how arrays will work: