Class JavaScriptExecutionJob
java.lang.Object
org.htmlunit.javascript.background.BasicJavaScriptJob
org.htmlunit.javascript.background.JavaScriptExecutionJob
- All Implemented Interfaces:
Comparable<JavaScriptJob>
,Runnable
,JavaScriptJob
- Direct Known Subclasses:
JavaScriptFunctionJob
,JavaScriptStringJob
A JavaScript-triggered background job representing the execution of some JavaScript code.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJavaScriptExecutionJob
(int initialDelay, Integer period, String label, WebWindow window) Creates a new JavaScript execution job, where the JavaScript code to execute is a string. -
Method Summary
Modifier and TypeMethodDescriptionvoid
run()
protected abstract void
runJavaScript
(HtmlPage page) Run the JavaScript from the concrete class.toString()
Methods inherited from class org.htmlunit.javascript.background.BasicJavaScriptJob
compareTo, getId, getInitialDelay, getPeriod, getTargetExecutionTime, isExecuteAsap, isPeriodic, setId, setTargetExecutionTime
-
Field Details
-
LOG
private static final org.apache.commons.logging.Log LOGLogging support. -
label_
The label for this job. -
window_
The window to which this job belongs (weakly referenced, so as not to leak memory).
-
-
Constructor Details
-
JavaScriptExecutionJob
Creates a new JavaScript execution job, where the JavaScript code to execute is a string.- Parameters:
initialDelay
- the initial amount of time to wait before executing this jobperiod
- the amount of time to wait between executions of this job (may benull
)label
- the label for the jobwindow
- the window to which the job belongs
-
-
Method Details
-
run
public void run() -
toString
- Overrides:
toString
in classBasicJavaScriptJob
-
runJavaScript
Run the JavaScript from the concrete class.- Parameters:
page
- theHtmlPage
that owns the script
-