Know where you just clic in an HtmlViewer ?

  1. 5 months ago

    Jean-Yves P

    Jun 12 Pre-Release Testers, Xojo Pro Europe (France, Besançon)

    Is there a possibility to know where (or inside which tag) in the html code of a desktop htmlviewer you just clic ?
    thanks.

    That would require adding event listeners to each element.
    https://www.w3schools.com/js/js_htmldom_eventlistener.asp

    There is a discussion about precisely adding event listeners to all a tags:
    https://stackoverflow.com/questions/26879630/capturing-clicks-on-all-a-tags-using-eventlistener

    I believe that would be possible with executejavascript.

  2. Michel B

    Jun 12 Pre-Release Testers, Xojo Pro Answer
    Edited 5 months ago

    That would require adding event listeners to each element.
    https://www.w3schools.com/js/js_htmldom_eventlistener.asp

    There is a discussion about precisely adding event listeners to all a tags:
    https://stackoverflow.com/questions/26879630/capturing-clicks-on-all-a-tags-using-eventlistener

    I believe that would be possible with executejavascript.

or Sign Up to reply!