* Returns an array of the non-input contenteditable elements linked to the given form element. * Two types of elements are possible, either located inside the form element, or outside. * For the outside elements, this only works if the form element has a defined id and that id is reference
(formElement)
| 3153 | * @private |
| 3154 | */ |
| 3155 | _getContenteditableElements(formElement) { |
| 3156 | if (AutoNumericHelper.isUndefinedOrNullOrEmpty(formElement) || !formElement.hasAttribute('id')) { |
| 3157 | return []; |
| 3158 | } |
| 3159 | const elementsInside = [...formElement.querySelectorAll('[contenteditable=true]')]; |
| 3160 | const elementsOutside = [...document.querySelectorAll(`*:not(input)[form=${formElement.getAttribute('id')}][contenteditable=true]`)]; |
| 3161 | |
| 3162 | return AutoNumericHelper.arrayUnique(elementsInside, elementsOutside); |
| 3163 | } |
| 3164 | |
| 3165 | /** |
| 3166 | * Returns a reference to the parent <form> element if it exists, otherwise return `null`. |
no test coverage detected