public class HtmlUnitContextFactory
extends net.sourceforge.htmlunit.corejs.javascript.ContextFactory
| Constructor and Description |
|---|
HtmlUnitContextFactory(WebClient webClient)
Creates a new instance of HtmlUnitContextFactory.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
configureErrorReporter(net.sourceforge.htmlunit.corejs.javascript.Context context)
Configures the
ErrorReporter on the context. |
protected Object |
doTopCall(net.sourceforge.htmlunit.corejs.javascript.Callable callable,
net.sourceforge.htmlunit.corejs.javascript.Context cx,
net.sourceforge.htmlunit.corejs.javascript.Scriptable scope,
net.sourceforge.htmlunit.corejs.javascript.Scriptable thisObj,
Object[] args) |
net.sourceforge.htmlunit.corejs.javascript.debug.Debugger |
getDebugger()
Returns the JavaScript debugger to use to receive JavaScript execution debugging information.
|
long |
getTimeout()
Returns the number of milliseconds a script is allowed to execute before
being terminated.
|
protected boolean |
hasFeature(net.sourceforge.htmlunit.corejs.javascript.Context cx,
int featureIndex) |
boolean |
isDeminifyFunctionCode()
Indicates code of calls like
new Function("...some code...") should be deminified to be more
readable when using the debugger. |
protected net.sourceforge.htmlunit.corejs.javascript.Context |
makeContext() |
protected void |
observeInstructionCount(net.sourceforge.htmlunit.corejs.javascript.Context cx,
int instructionCount)
Run-time calls this when instruction counting is enabled and the counter
reaches limit set by setInstructionObserverThreshold().
|
void |
setDebugger(net.sourceforge.htmlunit.corejs.javascript.debug.Debugger debugger)
Sets the JavaScript debugger to use to receive JavaScript execution debugging information.
|
void |
setDeminifyFunctionCode(boolean deminify)
Configures if the code of
new Function("...some code...") should be deminified to be more readable
when using the debugger. |
void |
setTimeout(long timeout)
Sets the number of milliseconds a script is allowed to execute before
being terminated.
|
addListener, call, checkNotSealed, createClassLoader, enter, enterContext, enterContext, exit, getApplicationClassLoader, getE4xImplementationFactory, getGlobal, getGlobalSetter, hasExplicitGlobal, initApplicationClassLoader, initGlobal, isSealed, onContextCreated, onContextReleased, removeListener, sealpublic HtmlUnitContextFactory(WebClient webClient)
webClient - the web client using this factorypublic void setTimeout(long timeout)
timeout - the timeout valuepublic long getTimeout()
public void setDebugger(net.sourceforge.htmlunit.corejs.javascript.debug.Debugger debugger)
DebuggerImpl, DebugFrameImpl) may be
used, or a custom debugger may be used instead. By default, no debugger is used.debugger - the JavaScript debugger to use (may be null)public net.sourceforge.htmlunit.corejs.javascript.debug.Debugger getDebugger()
null.public void setDeminifyFunctionCode(boolean deminify)
new Function("...some code...") should be deminified to be more readable
when using the debugger. This is a small performance cost.deminify - the new valuepublic boolean isDeminifyFunctionCode()
new Function("...some code...") should be deminified to be more
readable when using the debugger.protected net.sourceforge.htmlunit.corejs.javascript.Context makeContext()
makeContext in class net.sourceforge.htmlunit.corejs.javascript.ContextFactoryprotected void configureErrorReporter(net.sourceforge.htmlunit.corejs.javascript.Context context)
ErrorReporter on the context.context - the context to configureContext.setErrorReporter(ErrorReporter)protected void observeInstructionCount(net.sourceforge.htmlunit.corejs.javascript.Context cx,
int instructionCount)
observeInstructionCount in class net.sourceforge.htmlunit.corejs.javascript.ContextFactorycx - the context calling usinstructionCount - amount of script instruction executed since last call to observeInstructionCountprotected Object doTopCall(net.sourceforge.htmlunit.corejs.javascript.Callable callable, net.sourceforge.htmlunit.corejs.javascript.Context cx, net.sourceforge.htmlunit.corejs.javascript.Scriptable scope, net.sourceforge.htmlunit.corejs.javascript.Scriptable thisObj, Object[] args)
doTopCall in class net.sourceforge.htmlunit.corejs.javascript.ContextFactoryprotected boolean hasFeature(net.sourceforge.htmlunit.corejs.javascript.Context cx,
int featureIndex)
hasFeature in class net.sourceforge.htmlunit.corejs.javascript.ContextFactoryCopyright © 2002–2016 Gargoyle Software Inc.. All rights reserved.