0

A 3rd party application has the following link:

<a class="rlink" href="javascript:;" links='[{"data":"","name":"Detail","id":"b46c994e","type":"tunnel"}]'>Click me!</a>

Clicking the link opens a kind of overlay/popup window.

Presumably a JavaScript function is called when the link is clicked. I'd like to know what JavaScript runs.

The application has a tick running, so turning on the browser debugger freezes the application. I've gone down the rabbit hole trying to uncover something using this method, but can't make any sense of it, or see any relevance to the link/popup functionality.

Is there some way to trigger the debugger on click, or some other way to find what code is running when the link is clicked?

Note: There is no discernible Event attached to the link, either in FF inspector or using 'Visual Event' tool.

atlas_scoffed
  • 3,542
  • 30
  • 46
  • My guess, given that the href attribute does not call a named function, is that there is an event listener attached to the anchor. I would try to look for event listeners in the js or use browser tools to find one (like for this example https://stackoverflow.com/questions/10213703/how-do-i-view-events-fired-on-an-element-in-chrome-devtools). An event listener probably triggers a function that read the `links` attribute and constructs the overlay markup accordingly. – Dave Pritlove Apr 27 '22 at 23:31
  • Sorry, I just saw you said no discernable event is attached. It's difficult to see how clicking that anchor would do anything without one. The event could be attached to a parent element, or even the page, with a filter to act if the target is that anchor. – Dave Pritlove Apr 27 '22 at 23:35
  • Yes... I agree, but both FF Inspector and Visual Event tool don't show any events related to this links... I'm really not sure how it works. Also, selecting all 'Events' in the console Debug breakpoints yields nothing. – atlas_scoffed Apr 28 '22 at 01:39

0 Answers0