- Source:
Members
timeout :integer
Optional. Getter/setter for the timeout of the method returned by
Runnable#getRunnable
.
Values under zero are set to zero.
Type:
- integer
- Default Value:
- 10000 (10 seconds)
- Source:
Methods
getRunnable() → {function}
A method to get a function from that is evaluated inm various ways.
The returned function should call back with an result of any serializable kind by calling
`window.callPhantom(error, result)`.
If your method did not provoke an error, pass null as the first argument.
You can also throw an error from your returned function.
Console output from the returned function can be seen if DEBUG="*:debug" is enabled.
The time out of the returned function is controlled via
Runnable#timeout
.
Keep in mind that returned functions run in the webpage (and as such are restricted to browser features).
There are no node features available. Also, closures, etc. won't work.
Write this function as if it was called inside a pretty old WebKit.
The returned function will be called immediately after page load.
- Source:
Returns:
A function to be evaluated within the crawled webpage
- Type
- function