using bindAll in a constructor
i wanted to use _.bindAll(this) in a constructor.
unfortunately, i realized the prototype functions are not considered "own properties", so _.bindAll via _.funct开发者_高级运维ions won't find them.
is there another way to get at the prototype functions of "this" in a constructor functions?
You could use the dreaded for-in loop, since that iterates over prototype properties as well.
精彩评论