Viktar Donich
e711257fa2
Low-level helper plugin API for data binding
Utility wrapper for tracking Polymer element properties updates.
Usage example:
``` js
Gerrit.install(plugin => {
plugin.getDomHook('change-view').onAttached(element => {
if (!element.content) { return; }
plugin.attributeHelper(element.content)
.get('change')
.then(change => {
// Is executed once on switching to change view.
});
});
plugin.getDomHook('reply-text').onAttached(element => {
if (!element.content) { return; }
plugin.attributeHelper(element.content)
.bind('text', replyText => {
// Is called every time reply text changes.
});
});
});
```
Change-Id: Ia95364df58489f71ea1fd591a160b73ac1d60e96