Community
Participate
Working Groups
The Browser class has no event hooks for getting dialog events for javascript confirms/alerts/prompts/etc, much like it can for HTTP authentication demands. This is necessary for programmatically interacting with web pages, for instance to block alert boxes from popping up without disabling all of javascript.
Created attachment 146341 [details] Suggested Patch for Prompt Listening Here's my suggestion for a prompt listener and the Mozilla implementation.
Hello, is this functionality already implemeted or not yet? I would really appreciate it. If yes, how can does it work and how can I use it? Thanks a lot for reply.
SWT does not provide this API. A Browser client could probably accomplish this if they embedded Mozilla on all platforms and used JavaXPCOM to register their own PromptService2Factory (see SWT's Mozilla class for an example of doing this via XPCOM). For info about using JavaXPCOM see http://www.eclipse.org/swt/faq.php#howusejavaxpcom .
Is the issue here that other browsers don't make it that easy? It was quite easy to implement in Mozilla. The only tricky part was figuring out the right interface for the events.
Yes, last I checked, IE in particular did not provide a way to do this. If a way is found for IE then I think this could be considered.