public abstract class ScriptingEngineImpl extends org.mozilla.javascript.ScriptableObject implements ScriptingEngine
Constructor and Description |
---|
ScriptingEngineImpl() |
Modifier and Type | Method and Description |
---|---|
static void |
clearErrorMessages() |
protected void |
discardDocumentWriteBuffer() |
boolean |
doEvent(String eventScript)
Deprecated.
since 1.7 - use doEventScript instead
|
boolean |
doEventScript(String eventScript)
handle the event that has the given script attached
by compiling the eventScript as a function and executing it
|
Object |
evaluateExpression(String expression)
Evaluates the specified string as JavaScript.
|
protected String |
getDocumentWriteBuffer() |
static String[] |
getErrorMessages() |
boolean |
handleEvent(String eventName)
get the event Handler script for the event e.g.
|
static void |
handleScriptException(Exception e,
String badScript)
handle Exceptions
|
String |
runScript(String language,
String script)
run the given script
|
boolean |
supportsScriptLanguage(String language) |
associateValue, avoidObjectDetection, callMethod, callMethod, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, equivalentValues, get, get, getAllIds, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassName, getClassPrototype, getDefaultValue, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, has, has, hasInstance, hasProperty, hasProperty, isConst, isGetterOrSetter, isSealed, put, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setParentScope, setPrototype
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clearCaches, newScriptingEngine
public static void clearErrorMessages()
public static String[] getErrorMessages()
public static void handleScriptException(Exception e, String badScript)
e
- - the exception to handlebadScript
- - the script that caused the problempublic boolean supportsScriptLanguage(String language)
supportsScriptLanguage
in interface ScriptingHandler
public String runScript(String language, String script)
runScript
in interface ScriptingHandler
language
- - the language of the scriptscript
- - the script to runpublic boolean doEvent(String eventScript)
doEvent
in interface ScriptingEventHandler
eventScript
- - the script to usepublic boolean doEventScript(String eventScript)
doEventScript
in interface ScriptingEventHandler
eventScript
- - the script to usepublic boolean handleEvent(String eventName)
handleEvent
in interface ScriptingEventHandler
eventName
- public Object evaluateExpression(String expression)
evaluateExpression
in interface ScriptingHandler
expression
- - the expression to evaluateprotected String getDocumentWriteBuffer()
protected void discardDocumentWriteBuffer()
Copyright © 2012. All Rights Reserved.