This is the backend for the getElements() javascript function of the form. see https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/elements @return A List containing all non-image controls in the form. The form controls in the returned collection are in the same order i
()
| 585 | * object, output, select, textarea. |
| 586 | */ |
| 587 | public List<HtmlElement> getElementsJS() { |
| 588 | return getElements(htmlElement -> { |
| 589 | final String tagName = htmlElement.getTagName(); |
| 590 | if (HtmlInput.TAG_NAME.equals(tagName)) { |
| 591 | return !(htmlElement instanceof HtmlImageInput); |
| 592 | } |
| 593 | |
| 594 | return HtmlButton.TAG_NAME.equals(tagName) |
| 595 | || HtmlFieldSet.TAG_NAME.equals(tagName) |
| 596 | || HtmlObject.TAG_NAME.equals(tagName) |
| 597 | || HtmlOutput.TAG_NAME.equals(tagName) |
| 598 | || HtmlSelect.TAG_NAME.equals(tagName) |
| 599 | || HtmlTextArea.TAG_NAME.equals(tagName); |
| 600 | }); |
| 601 | } |
| 602 | |
| 603 | /** |
| 604 | * @param filter a predicate to filter the element |
no test coverage detected