Package org.htmlunit.html
Interface ElementFromPointHandler
public interface ElementFromPointHandler
An interface to allow the user to specify which element to return for the javascript
document.elementFromPoint()
.
This is needed since calculating the element location is outside the current scope of HtmlUnit.
-
Method Summary
Modifier and TypeMethodDescriptiongetElementFromPoint
(HtmlPage htmlPage, int x, int y) Returns the element for the specified x coordinate and the specified y coordinate.
-
Method Details
-
getElementFromPoint
Returns the element for the specified x coordinate and the specified y coordinate. The current implementation always returns the <body> element.- Parameters:
htmlPage
- the pagex
- the x offset, in pixelsy
- the y offset, in pixels- Returns:
- the element for the specified x coordinate and the specified y coordinate
-