public class WindowModel extends ModelMapper
Modifier and Type | Class and Description |
---|---|
class |
WindowModel.CallbackObject |
ModelMapper.NonexistantMethod
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
WINDOW_UNDEFINED_VAR_NAME |
additionalFunctions, inConstructor, underlyingMap
Constructor and Description |
---|
WindowModel(ScrapingSession session,
java.lang.String userAgent) |
Modifier and Type | Method and Description |
---|---|
DOMNode |
convertNodeToDOMNode(org.jsoup.nodes.Node node) |
void |
executeCallbackIfScheduled()
Executes the next scheduled callback to be run, if there is one to be run currently
|
ScrapingSession |
getCurrentScrapingSession() |
WindowModel.CallbackObject |
getNextTimedMethod()
This should be run in the script engine, then called.
|
java.util.Map<java.lang.String,java.lang.Object> |
getSpecialCallbacksForClass(java.lang.Class<?> clazz) |
boolean |
hasNextTimedMethod()
Returns whether or not there is a callback on queue that can be run
|
void |
setAutoExecuteCallbacks(boolean autoExecuteCallbacks)
Sets whether or not callbacks should be executed automatically during execution.
|
java.lang.Object |
setInternalJavaScriptMethodHandler(java.lang.Class<?> clazz,
java.lang.String name,
java.lang.Object functionCallback) |
java.lang.Object |
setInterval(java.lang.Runnable function,
java.lang.Number time,
java.lang.Object... args) |
java.lang.Object |
setTimeout(java.lang.Runnable function,
java.lang.Number time,
java.lang.Object... args) |
void |
setUnderlyingDocument(DocumentModel documentModel)
Completes initialization (the document needs to know the window when built)
|
clear, containsKey, containsValue, entrySet, get, hasOwnProperty, isEmpty, keySet, logDebug, put, putAll, remove, runTimedCallbacks, size, values
public static final java.lang.String WINDOW_UNDEFINED_VAR_NAME
public WindowModel(@NotNull ScrapingSession session, @NotNull java.lang.String userAgent)
public java.lang.Object setInternalJavaScriptMethodHandler(java.lang.Class<?> clazz, java.lang.String name, java.lang.Object functionCallback)
public java.util.Map<java.lang.String,java.lang.Object> getSpecialCallbacksForClass(java.lang.Class<?> clazz)
public void setAutoExecuteCallbacks(boolean autoExecuteCallbacks)
autoExecuteCallbacks
- Whether or not to automatically execute callbacks as they are scheduled for runpublic ScrapingSession getCurrentScrapingSession()
@NotNull public DOMNode convertNodeToDOMNode(@NotNull org.jsoup.nodes.Node node)
@InternalOnly public void setUnderlyingDocument(@NotNull DocumentModel documentModel) throws java.net.URISyntaxException
documentModel
- The document to setjava.net.URISyntaxException
- On error in the URL format@Nullable public WindowModel.CallbackObject getNextTimedMethod()
public void executeCallbackIfScheduled()
public boolean hasNextTimedMethod()
public java.lang.Object setInterval(@NotNull java.lang.Runnable function, @NotNull java.lang.Number time, java.lang.Object... args)