com.teamdev.jxbrowser.script
Class ScriptErrorWatcher

java.lang.Object
  extended by com.teamdev.jxbrowser.script.ScriptErrorWatcher

public final class ScriptErrorWatcher
extends java.lang.Object

Provides functionality that allows watching all JavaScript errors. You can get access to the Browser ScriptErrorWatcher instance using the BrowserServices.getScriptErrorWatcher() method.


Constructor Summary
ScriptErrorWatcher()
          Constructs a new ScriptErrorWatcher instance.
 
Method Summary
 void addScriptErrorListener(ScriptErrorListener listener)
          Registers a listener to be notified when JavaScript execution problem occurs.
 java.util.List<ScriptErrorListener> getScriptErrorListeners()
          Returns a list of all registered script error listeners.
 void removeScriptErrorListener(ScriptErrorListener listener)
          Unregisters a listener so it will not receive notifications when JavaScript execution error occurs.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScriptErrorWatcher

public ScriptErrorWatcher()
Constructs a new ScriptErrorWatcher instance.

Method Detail

addScriptErrorListener

public void addScriptErrorListener(ScriptErrorListener listener)
Registers a listener to be notified when JavaScript execution problem occurs.

Parameters:
listener - the script error listener.

removeScriptErrorListener

public void removeScriptErrorListener(ScriptErrorListener listener)
Unregisters a listener so it will not receive notifications when JavaScript execution error occurs.

Parameters:
listener - the script error listener.

getScriptErrorListeners

public java.util.List<ScriptErrorListener> getScriptErrorListeners()
Returns a list of all registered script error listeners.

Returns:
a copy of all registered script error listeners.