0

Is there any web browser component for Java or C# that supports JavaScript and can detect when a page fully loaded?
(When the page and its images are loaded, and the ajax requests are complete.)

2 Answers 2

2

Yes, check out the Elicpse SWT browser widget

http://www.eclipse.org/swt/

But keep in mind that "when AJAX requests are complete" is not a trivial issue. If actions once the page is "loaded" cause additional async DOM modifications, then when is it "finally loaded" becomes an issue.

Sign up to request clarification or add additional context in comments.

2 Comments

I would like to do something like to run a Java or C# function when the JavasScript window.onload function would be called.
Check the SWT docs to see if you can intercept that event via its Listener hierarchy; if you can, then you can certainly do that. If not, another route is an alternative to SWT (but same kind of widget) or you can also look at writing an extension for something like Firefox. (not sure that's possible in your scenario, but it is an option)
1

C# has the WebBrowser class which actually just is the IE that is installed on your computer. It's quite rich in functionality and has many methods. Perhaps it is enough for your goal. Certainly IE can do javascript and "knows" when Ajax calls are finished.

http://msdn.microsoft.com/en-us/library/system.windows.forms.webbrowser.aspx

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.