* Gets the key used to access text content on a DOM node. * * @return {?string} Key used to access text content. * @internal
()
| 2796 | * @internal |
| 2797 | */ |
| 2798 | function getTextContentAccessor() { |
| 2799 | if (!contentKey && ExecutionEnvironment.canUseDOM) { |
| 2800 | // Prefer textContent to innerText because many browsers support both but |
| 2801 | // SVG <text> elements don't support innerText even when <div> does. |
| 2802 | contentKey = 'textContent' in document.documentElement ? 'textContent' : 'innerText'; |
| 2803 | } |
| 2804 | return contentKey; |
| 2805 | } |
| 2806 | |
| 2807 | /** |
| 2808 | * This helper object stores information about text content of a target node, |
no outgoing calls
no test coverage detected