public interface PromptListener extends EventListener
The class that is interested in processing a Prompt event implements this interface (and all the methods it contains).
The listener object created from that class is then registered with an
IBrowserCanvas
using the addPromptListentener method.
This is used to stop showing browser dialogs. The following example shows how to block all dialogs using this listener:
browser.addPromptListener( new PromptListener() {
public void onPromptDialog( PromptEvent e ) {
System.out.println( "Blocking a dialog with type: " + e.getDialogType() );
e.blockPromptDialog(); //Stops the dialog from being shown
}
}
Modifier and Type | Method and Description |
---|---|
void |
onPromptDialog(PromptEvent e)
Invoked when the browser is about to show a dialog.
|
void onPromptDialog(PromptEvent e)