Class JavaScriptStringJob
java.lang.Object
org.htmlunit.javascript.background.BasicJavaScriptJob
org.htmlunit.javascript.background.JavaScriptExecutionJob
org.htmlunit.javascript.background.JavaScriptStringJob
- All Implemented Interfaces:
Comparable<JavaScriptJob>
,Runnable
,JavaScriptJob
A
JavaScriptJob
created from a string of code.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJavaScriptStringJob
(int initialDelay, Integer period, String label, WebWindow window, String script) Creates a new JavaScript execution job, where the JavaScript code to execute is a string. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
runJavaScript
(HtmlPage page) Run the JavaScript from the concrete class.Methods inherited from class org.htmlunit.javascript.background.JavaScriptExecutionJob
run, toString
Methods inherited from class org.htmlunit.javascript.background.BasicJavaScriptJob
compareTo, getId, getInitialDelay, getPeriod, getTargetExecutionTime, isExecuteAsap, isPeriodic, setId, setTargetExecutionTime
-
Field Details
-
script_
The JavaScript code to execute.
-
-
Constructor Details
-
JavaScriptStringJob
JavaScriptStringJob(int initialDelay, Integer period, String label, WebWindow window, String script) 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 belongsscript
- the JavaScript code to execute
-
-
Method Details
-
runJavaScript
Run the JavaScript from the concrete class.- Specified by:
runJavaScript
in classJavaScriptExecutionJob
- Parameters:
page
- theHtmlPage
that owns the script
-