Class JavaScriptStringJob
- java.lang.Object
-
- org.htmlunit.javascript.background.BasicJavaScriptJob
-
- org.htmlunit.javascript.background.JavaScriptExecutionJob
-
- org.htmlunit.javascript.background.JavaScriptStringJob
-
- All Implemented Interfaces:
java.lang.Comparable<JavaScriptJob>
,java.lang.Runnable
,JavaScriptJob
class JavaScriptStringJob extends JavaScriptExecutionJob
AJavaScriptJob
created from a string of code.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
script_
The JavaScript code to execute.
-
Constructor Summary
Constructors Constructor Description JavaScriptStringJob(int initialDelay, java.lang.Integer period, java.lang.String label, WebWindow window, java.lang.String script)
Creates a new JavaScript execution job, where the JavaScript code to execute is a string.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected 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
-
-
-
-
Constructor Detail
-
JavaScriptStringJob
JavaScriptStringJob(int initialDelay, java.lang.Integer period, java.lang.String label, WebWindow window, java.lang.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 Detail
-
runJavaScript
protected void runJavaScript(HtmlPage page)
Run the JavaScript from the concrete class.- Specified by:
runJavaScript
in classJavaScriptExecutionJob
- Parameters:
page
- theHtmlPage
that owns the script
-
-