* @param {HTMLElement} input * @return {boolean}
(input: HTMLTextAreaElement | HTMLInputElement)
| 11 | * @return {boolean} |
| 12 | */ |
| 13 | function canManipulateViaTextNodes(input: HTMLTextAreaElement | HTMLInputElement): boolean { |
| 14 | if (input.nodeName !== 'TEXTAREA') { |
| 15 | return false; |
| 16 | } |
| 17 | if (typeof browserSupportsTextareaTextNodes === 'undefined') { |
| 18 | const textarea: HTMLTextAreaElement = document.createElement('textarea'); |
| 19 | textarea.value = '1'; |
| 20 | browserSupportsTextareaTextNodes = !!textarea.firstChild; |
| 21 | } |
| 22 | return browserSupportsTextareaTextNodes; |
| 23 | } |
| 24 | |
| 25 | /** |
| 26 | * @param {HTMLTextAreaElement|HTMLInputElement} input |
no outgoing calls
no test coverage detected
searching dependent graphs…