benpickles / js-model

Work with models in your JavaScript
http://benpickles.github.io/js-model/
MIT License
403 stars 42 forks source link

"change" event is not triggered on attr(key, "val") #35

Closed rstacruz closed 10 years ago

rstacruz commented 10 years ago

By example:

project.bind("change", function() { ... });

project.attr({ name: "Hello" });  /* triggers 'change' */
project.attr("name", "Hello");  /* doesn't trigger 'change' */

It seems like this is by design. Can I ask what's the rationale behind that?

benpickles commented 10 years ago

Yes you're right, it was quickly added as that's all I required at the time. The (unreleased) master version has the behaviour you desire but it also has many other breaking changes so wouldn't be a simple upgrade.

It would be fair to describe this project as "dead" as it hasn't seen a release in years. Nowadays there are many other alternatives to this library and with much sadness I suggest you switch to one of them :(