WebBrowser.InvokeScript Method (String)
Executes a script function that is implemented by the currently loaded document.
Assembly: PresentationFramework (in PresentationFramework.dll)
should not be called before the document that implements it has finished loading. You can detect when a document has finished loading by handling the LoadCompleted event.
The following example shows how to call a script function in a document from a WPF application by using . In this example, the script function has no parameters.
The following is the HTML document that implements the script function that will be called from WPF.
The following shows the WPF implementation to call the script function in the HTML document.