Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How can I locate the js event handler code by inspecting the html element?

Say I'm on a UI5 application page, there's a button, and I would like to find out which event handler logic is binded to this button, without searching through the controller js file by keyword, how can I locate the js event handler code by inspecting the html element? I tried, but there's no html attribute like onclick='' in the html. Thank you.

Tags:
Former Member
Former Member replied

SAPUI5 Diagnostics tools would do it. But there are api's that would do it very much simpler than that. When you inspect the html, just find the runtime id of the control.

  • open the console tab in debugger tools
  • $("#<control-id>").control(0); // gives the sapui5 instance of the control
  • Expand the mEvenRegistry
1 View this answer in context
Not what you were looking for? View more on this topic or Ask a question