Interface JavaScriptErrorListener

All Known Implementing Classes:
DefaultJavaScriptErrorListener, SilentJavaScriptErrorListener

public interface JavaScriptErrorListener
A listener for JavaScript exceptions.
  • Method Details

    • scriptException

      void scriptException(HtmlPage page, ScriptException scriptException)
      Informs about a javascript exceptions.
      Parameters:
      page - the page that causes the problem
      scriptException - the occurred script exception
    • timeoutError

      void timeoutError(HtmlPage page, long allowedTime, long executionTime)
      Informs about a javascript timeout error.
      Parameters:
      page - the page that causes the problem
      allowedTime - the max time allowed for the execution
      executionTime - the already consumed time
    • malformedScriptURL

      void malformedScriptURL(HtmlPage page, String url, MalformedURLException malformedURLException)
      Informs about a malformed url referencing to to script.
      Parameters:
      page - the page that causes the problem
      url - the malformed url
      malformedURLException - the occurred exception
    • loadScriptError

      void loadScriptError(HtmlPage page, URL scriptUrl, Exception exception)
      Informs about an exception during load of a javascript file refereed from a page.
      Parameters:
      page - the page that causes the problem
      scriptUrl - the url to load the script from
      exception - the occurred exception
    • warn

      void warn(String message, String sourceName, int line, String lineSource, int lineOffset)
      Informs about a javascript warning.
      Parameters:
      message - the message to be displayed
      sourceName - the name of the source file
      line - the line number
      lineSource - the source code that failed
      lineOffset - the line offset