Backbone's design allows for both static (unchanging, not ES6 static)
and dynamic (function-based) values for many class attributes. To safely
query these, callers are expected to access these attributes using
_.result(obj, 'attrname')
, which doesn't feel natural with ES6
classes.
This change introduces accessors for these attributes. You can now fetch
myModel.getURL()
or myView.getTagName()
, for example, instead of
_.result(myModel, 'url')
or _.result(myView, 'tagName')
.
These are type-safe as well.