@observe was too complex. In practice, we only used @observe(after=) and almost exclusively called a single "sync properties to the DOM" method.
For now, we can safely refactor this functionality into @property via a change= attribute:
@property (change=_updateContent) title : String
Eventually, I'd like to have a simple observe attribute:
@property (observe) title : String
This would call propertyDidChange/observePropertyChange/etc in setTitle:. From there, implementation-specific methods like setNeedsUpdate or setNeedsLayout could be called.
@observe
was too complex. In practice, we only used@observe(after=)
and almost exclusively called a single "sync properties to the DOM" method.For now, we can safely refactor this functionality into
@property
via achange=
attribute:@property (change=_updateContent) title : String
Eventually, I'd like to have a simple
observe
attribute:@property (observe) title : String
This would call
propertyDidChange
/observePropertyChange
/etc insetTitle:
. From there, implementation-specific methods likesetNeedsUpdate
orsetNeedsLayout
could be called.