Interface JavaScriptErrorListener
- All Known Implementing Classes:
DefaultJavaScriptErrorListener, SilentJavaScriptErrorListener
public interface JavaScriptErrorListener
A listener for JavaScript exceptions.
-
Method Summary
Modifier and TypeMethodDescriptionvoidloadScriptError(HtmlPage page, URL scriptUrl, Exception exception) Informs about an exception during load of a javascript file refereed from a page.voidmalformedScriptURL(HtmlPage page, String url, MalformedURLException malformedURLException) Informs about a malformed url referencing to to script.voidscriptException(HtmlPage page, ScriptException scriptException) Informs about a javascript exceptions.voidtimeoutError(HtmlPage page, long allowedTime, long executionTime) Informs about a javascript timeout error.voidInforms about a javascript warning.
-
Method Details
-
scriptException
Informs about a javascript exceptions.- Parameters:
page- the page that causes the problemscriptException- the occurred script exception
-
timeoutError
Informs about a javascript timeout error.- Parameters:
page- the page that causes the problemallowedTime- the max time allowed for the executionexecutionTime- the already consumed time
-
malformedScriptURL
Informs about a malformed url referencing to to script.- Parameters:
page- the page that causes the problemurl- the malformed urlmalformedURLException- the occurred exception
-
loadScriptError
-
warn
Informs about a javascript warning.- Parameters:
message- the message to be displayedsourceName- the name of the source fileline- the line numberlineSource- the source code that failedlineOffset- the line offset
-