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 Detail

      • getElementFromPoint

        HtmlElement getElementFromPoint​(HtmlPage htmlPage,
                                        int x,
                                        int y)
        Returns the element for the specified x coordinate and the specified y coordinate. The current implementation always returns the <body> element.
        Parameters:
        htmlPage - the page
        x - the x offset, in pixels
        y - the y offset, in pixels
        Returns:
        the element for the specified x coordinate and the specified y coordinate