I\'m using the WPF 3.5SP1 WebBrowser control to display a page containing some javascript functions. My program then needs to invoke a javascript function which will make an
Is there a way I can make the first javascript function sleep until something happens (with out locking up the browser)?
In the way that you're expecting it to work, no.
AFAIK, thread control or continuous looping are needed -- the first is unavailable in JavaScript and the latter will lock up most browsers.
I think you'll need to have JavaScript send result
to the server with Ajax (from some-async-function-complete
). Then, break up your C# to have one part call myscript
and another respond and process result
.