INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK. @return the element with focus or the body
()
| 2588 | * @return the element with focus or the body |
| 2589 | */ |
| 2590 | public HtmlElement getActiveElement() { |
| 2591 | final DomElement activeElement = getFocusedElement(); |
| 2592 | if (activeElement instanceof HtmlElement element) { |
| 2593 | return element; |
| 2594 | } |
| 2595 | |
| 2596 | final HtmlElement body = getBody(); |
| 2597 | if (body != null) { |
| 2598 | return body; |
| 2599 | } |
| 2600 | return null; |
| 2601 | } |
| 2602 | |
| 2603 | /** |
| 2604 | * <p><span style="color:red">INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.</span></p> |
no test coverage detected