:right-sidebar: True WebHitTestResult =================================================================== .. currentmodule:: gi.repository.WebKitWebProcessExtension .. versionadded:: 2.8 .. class:: WebHitTestResult(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.GObject.Object` Result of a Hit Test (Web Process Extensions). WebKitWebHitTestResult extends :obj:`~gi.repository.WebKitWebProcessExtension.HitTestResult` to provide information about the ``WebKitDOMNode`` in the coordinates of the Hit Test. Methods ------- .. rst-class:: interim-class .. class:: WebHitTestResult :no-index: .. method:: context_is_editable() -> bool Check whether there is an editable element at the hit test position. Checks whether :const:`~gi.repository.WebKitWebProcessExtension.HitTestResultContext.EDITABLE` flag is present in the context flags. .. method:: context_is_image() -> bool Check whether there is an image element at the hit test position. Checks whether :const:`~gi.repository.WebKitWebProcessExtension.HitTestResultContext.IMAGE` flag is present in the context flags. .. method:: context_is_link() -> bool Check whether there is a link element at the hit test position. Checks whether :const:`~gi.repository.WebKitWebProcessExtension.HitTestResultContext.LINK` flag is present in the context flags. .. method:: context_is_media() -> bool Check whether there is a media element at the hit test position. Checks whether :const:`~gi.repository.WebKitWebProcessExtension.HitTestResultContext.MEDIA` flag is present in the context flags. .. method:: context_is_scrollbar() -> bool Check whether there is a scrollbar at the hit test position. Checks whether :const:`~gi.repository.WebKitWebProcessExtension.HitTestResultContext.SCROLLBAR` flag is present in the context flags. .. method:: context_is_selection() -> bool Check whether there is a selected element at the hit test position. Checks whether :const:`~gi.repository.WebKitWebProcessExtension.HitTestResultContext.SELECTION` flag is present in the context flags. .. method:: get_context() -> int Gets the the context flags for the hit test result. .. method:: get_image_uri() -> str Obtains the URI associated with the image element at the hit test position. .. method:: get_js_node(world: ~gi.repository.WebKitWebProcessExtension.ScriptWorld | None = None) -> ~gi.repository.JavaScriptCore.Value | None Get the :obj:`~gi.repository.JavaScriptCore.Value` for the DOM node in ``world`` at the coordinates of the Hit Test. .. versionadded:: 2.40 :param world: a :obj:`~gi.repository.WebKitWebProcessExtension.ScriptWorld`\, or :const:`None` to use the default .. method:: get_link_label() -> str Obtains the label associated with the link element at the hit test position. .. method:: get_link_title() -> str Obtains the title associated with the link element at the hit test position. .. method:: get_link_uri() -> str Obtains the URI associated with the link element at the hit test position. .. method:: get_media_uri() -> str Obtains the URI associated with the media element at the hit test position.