Our Developer Documents provide an explanation of how the Widget can provide you with a variety of events are available in order to allow you to respond to button presses, stage changes and errors in your flow.
Browser events can be captured from the Widget by adding to Widget.cshtml file.
Events are triggered on the document. An event handler should take the following format:
DIDjQuery(document).on('<DID Event Name>', function(didEvent, didEventData)
{ didEvent.eventData = didEventData; console.log(didEvent); });
This is the correct event handler to grab the widget initialization complete event:
DIDjQuery(document).on('didInitComplete', function(didEvent, didEventData) { didEvent.eventData = didEventData; console.log(didEvent); } );
If you are still using v1 of the DirectID Widget, then our migration guide contains details of the changes to the event names.