Class JavaScriptFunctionJob
java.lang.Object
org.htmlunit.javascript.background.BasicJavaScriptJob
org.htmlunit.javascript.background.JavaScriptExecutionJob
org.htmlunit.javascript.background.JavaScriptFunctionJob
- All Implemented Interfaces:
Comparable<JavaScriptJob>,Runnable,JavaScriptJob
A
JavaScriptJob created from a Function object.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJavaScriptFunctionJob(int initialDelay, Integer period, String label, WebWindow window, org.htmlunit.corejs.javascript.Function function, Object[] args) Creates a new JavaScript execution job, where the JavaScript code to execute is a function. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidrunJavaScript(HtmlPage page) Run the JavaScript from the concrete class.Methods inherited from class org.htmlunit.javascript.background.JavaScriptExecutionJob
run, toStringMethods inherited from class org.htmlunit.javascript.background.BasicJavaScriptJob
compareTo, getId, getInitialDelay, getPeriod, getTargetExecutionTime, isExecuteAsap, isPeriodic, setId, setTargetExecutionTime
-
Field Details
-
function_
private final org.htmlunit.corejs.javascript.Function function_The JavaScript code to execute. -
args_
-
-
Constructor Details
-
JavaScriptFunctionJob
JavaScriptFunctionJob(int initialDelay, Integer period, String label, WebWindow window, org.htmlunit.corejs.javascript.Function function, Object[] args) Creates a new JavaScript execution job, where the JavaScript code to execute is a function.- 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 belongsfunction- the JavaScript code to executeargs- the arguments to pass into the function call
-
-
Method Details
-
runJavaScript
Run the JavaScript from the concrete class.- Specified by:
runJavaScriptin classJavaScriptExecutionJob- Parameters:
page- theHtmlPagethat owns the script
-