flightjs/flight — pull request #150 by danwrong (2013-07-26 17:22:51+00:00)
Title: Attribute rework

This patch introduces this.attributes (which we alias to this.defaultAttrs) which improves attributes interaction with mixins and introduces some extra assertions to help developers.

It's all backwards compatible apart from one big change (which I think we need to be cautious about before merging):

If you pass any attributes into attachTo that the component has not declared then they are ignored. Example:

var F = flight.component(function() {
this.defaultAttrs({
thing: 1
});
});

F.attachTo(elem, { thang: 1, thing: 10 });

// Old attrs
// { thang: 1, thing: 10 }

// After this change
// { thing: 10 }

I think this will be a breaking change for Twitter's code base. In might well be for others. Thoughts?