(value)
| 1739 | var oldValue; |
| 1740 | |
| 1741 | var textContent = function textContent(value) { |
| 1742 | if (oldValue !== value) { |
| 1743 | oldValue = value; |
| 1744 | |
| 1745 | var type = typeof(value); |
| 1746 | |
| 1747 | if (type === 'object' && value) { |
| 1748 | if (isPromise_ish(value)) { |
| 1749 | value.then(textContent); |
| 1750 | } else if ('placeholder' in value) { |
| 1751 | invokeAtDistance(value, textContent); |
| 1752 | } else if ('text' in value) { |
| 1753 | textContent(String(value.text)); |
| 1754 | } else if ('any' in value) { |
| 1755 | textContent(value.any); |
| 1756 | } else if ('html' in value) { |
| 1757 | textContent([].concat(value.html).join('')); |
| 1758 | } else if ('length' in value) { |
| 1759 | textContent(slice.call(value).join('')); |
| 1760 | } else { |
| 1761 | textContent(Intent.invoke(value, textContent)); |
| 1762 | } |
| 1763 | } else if (type === 'function') { |
| 1764 | textContent(value(node)); |
| 1765 | } else { |
| 1766 | node.textContent = value == null ? '' : value; |
| 1767 | } |
| 1768 | } |
| 1769 | }; |
| 1770 | |
| 1771 | return textContent; |
| 1772 | } |
nothing calls this directly
no test coverage detected