flake8
passed.
JSHint
passed.
Review Request #13552 — Created Feb. 18, 2024 and submitted
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()
ormyView.getTagName()
, for example, instead of
_.result(myModel, 'url')
or_.result(myView, 'tagName')
.These are type-safe as well.
Unit tests pass.
Summary | ID |
---|---|
5c9ef77e7a1c80b17813f6aa5efbf98125e2df21 |