As far as I can tell, "name" is always the same to the inner and outer function, so it could be handled easily by the closure. (In contrast "node" is not the same. It starts as a node in the template, but it becomes the node from the instance).
Alternatively -- if the goal is to help people avoid the closure, then shouldn't "path" be passed in again too?
prepareBinding takes (path, name, node), and returns a function that takes (model, name, node), for example:
As far as I can tell, "name" is always the same to the inner and outer function, so it could be handled easily by the closure. (In contrast "node" is not the same. It starts as a node in the template, but it becomes the node from the instance).
Alternatively -- if the goal is to help people avoid the closure, then shouldn't "path" be passed in again too?