| <dom-module id="bind-parameters"> |
| Gerrit.install(plugin => { |
| plugin.registerCustomComponent( |
| 'change-view-integration', 'my-bind-sample'); |
| <dom-module id="my-bind-sample"> |
| Template example: Patchset number [[revision._number]]. <br/> |
| Computed example: [[computedExample]]. |
| computed: '_computeExample(revision._number)', |
| this.plugin.attributeHelper(this).bind( |
| 'revision', this._onRevisionChanged.bind(this)); |
| if (!value) { return '(empty)'; } |
| return `(patchset ${value} selected)`; |
| _onRevisionChanged(value) { |
| console.log(`(attributeHelper.bind) revision number: ${value._number}`); |