My object in C# will call some JavaScript when constructed through the webbrowser control. The JavaScript will then call back to our c# code with a success or failure. I need to have the constructor of the C# object wait until the JavaScript returns the callback before it leaves the constructor. How would I go about doing this?
Essentially, I need to make sure that the object will always be properly initialized when created. This is dependent on the javascript calling back, which is at least slightly variable.