Iam trying to display somekind of help page in html within my wpf application and Ive loaded the html from my resourcers and it contains multiple javascript functions that i want to execute from c#.
This is how it should be done:
webBrowser1.InvokeScript("MyFunction");
This does not work at all, I get the error code:
Unknown name. (Exception from HRESULT: 0x80020006 (DISP_E_UNKNOWNNAME))
Microsoft has no help regarding this and googling didn`t do the trick either.
Question: How do you invokescript in a wpf webbrowser?
As per MSDN –
This guy here getting the same error and the reason is the one stated above i.e. trying to invoke before the document has been loaded.