1

With reference to http://dotnetbrowser-support.teamdev.com/documentation/dom-events, I need to add an event listener for the whole document, listening for click events. In the event listener I need to get the DOMElement where the user clicked. Is this possible. Could not find from documentation/samples how to get this from DOMEventArgs.

Thank you !

Edit: I guess DOMEventArgs.Target can be simply cast to DOMElement ?

1 Answers1

0

Yes, your guess is correct. DOMEventArgs.Target and DOMEventArgs.CurrentTarget can be cast to DOMElement in general case.

Anna Dolbina
  • 1
  • 1
  • 8
  • 9
  • If you follow the documentation, this retrieves not the selected element on the page, but the page as a whole... since the e.CurrentTarget == document.DocumentElement of the entire page. – Capt. Rochefort Jun 18 '18 at 17:17