Open wkeese opened 7 years ago
I'd be up for a PR to add that functionality, but perhaps it should be inside of the Bind
method instead of on the object, i.e.
var user = Bind({ first: "Bob", last: "Jones"});
Bind.update(user, { age: 30, location: 'foo' }, { age: '#age', location: { ... });
The
Bind()
function creates an "observable Object" (the return value from the function) and sets up bindings to other Objects (often DOM nodes). But AFAICT there's no way to dynamically add or remove bindings to an existing "observable Object". Something like:The reason that would be nice is for code decoupling, i.e. so various pieces of code that don't know about each other can attach to
user
.