* Print out the element's bound attributes and respective expression values. * @param {!Element} element * @private
(element)
| 1700 | * @private |
| 1701 | */ |
| 1702 | debugPrintElement_(element) { |
| 1703 | const index = findIndex(this.boundElements_, (boundElement) => { |
| 1704 | return boundElement.element == element; |
| 1705 | }); |
| 1706 | if (index < 0) { |
| 1707 | user().info(TAG, 'Element has no bindings:', element); |
| 1708 | return; |
| 1709 | } |
| 1710 | // Evaluate expressions in bindings in `element`. |
| 1711 | const promises = []; |
| 1712 | const {boundProperties} = this.boundElements_[index]; |
| 1713 | boundProperties.forEach((boundProperty) => { |
| 1714 | const {expressionString} = boundProperty; |
| 1715 | promises.push(this.evaluateExpression_(expressionString, this.state_)); |
| 1716 | }); |
| 1717 | // Print the map of attribute to expression value for `element`. |
| 1718 | Promise.all(promises).then((results) => { |
| 1719 | const output = map(); |
| 1720 | boundProperties.forEach((boundProperty, i) => { |
| 1721 | const {property} = boundProperty; |
| 1722 | output[property] = results[i]; |
| 1723 | }); |
| 1724 | user().info(TAG, output); |
| 1725 | }); |
| 1726 | } |
| 1727 | |
| 1728 | /** |
| 1729 | * @param {string} expression |
no test coverage detected