You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to be able to use _variables not just from functions but from attributes. For example in the following code I have to create 2 separate variables (template and c), and refer to template from c's _add() function:
Currently this is not possible because that's how JavaScript works--you can't refer to an object's attribute from its own definition. (In above case the this in this._template will be bound to the window object.
Even though this is not natively possible with JS maybe there's a clever way around it.
The text was updated successfully, but these errors were encountered:
It would be nice to be able to use _variables not just from functions but from attributes. For example in the following code I have to create 2 separate variables (template and c), and refer to
template
fromc
's_add()
function:It would be nice if this could be somehow expressed as :
Currently this is not possible because that's how JavaScript works--you can't refer to an object's attribute from its own definition. (In above case the
this
inthis._template
will be bound to thewindow
object.Even though this is not natively possible with JS maybe there's a clever way around it.
The text was updated successfully, but these errors were encountered: