Willy
Willy

Reputation: 1838

Is it possible to detect any javascript functions are called when using C# WebBrowser

Is it possible I can detect javascript functions are called when using C# WinForms WebBrowser ? I know it is easy to do it if the javascript functions are my own. But as today I need to browse others' pages, for example, can it be detected when .createElement() or .appendChild() is called?

Upvotes: 2

Views: 759

Answers (1)

Turnkey
Turnkey

Reputation: 9416

You might try to inject some Javascript into the control by appending code to the head, similar to this post: How to Inject Javascript in Web Browser Control. The injected code could be a function to monitor events on a particular DOM element.

Upvotes: 2

Related Questions