com.meterware.httpunit.javascript
Class JavaScript.Document
java.lang.Object
org.mozilla.javascript.ScriptableObject
com.meterware.httpunit.javascript.ScriptingEngineImpl
com.meterware.httpunit.javascript.JavaScript.Document
- All Implemented Interfaces:
- ScriptingEngine, ScriptingEventHandler, ScriptingHandler, java.io.Serializable, org.mozilla.javascript.ConstProperties, org.mozilla.javascript.debug.DebuggableObject, org.mozilla.javascript.Scriptable
- Enclosing class:
- JavaScript
public static class JavaScript.Document
- extends ScriptingEngineImpl
Document script handling
- See Also:
- Serialized Form
Fields inherited from class org.mozilla.javascript.ScriptableObject |
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST |
Fields inherited from interface org.mozilla.javascript.Scriptable |
NOT_FOUND |
Methods inherited from class org.mozilla.javascript.ScriptableObject |
associateValue, avoidObjectDetection, callMethod, callMethod, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, equivalentValues, getAllIds, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, has, hasInstance, hasProperty, hasProperty, isConst, isGetterOrSetter, isSealed, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setParentScope, setPrototype |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
_scriptable
protected ScriptableDelegate _scriptable
_parent
protected com.meterware.httpunit.javascript.JavaScript.JavaScriptEngine _parent
JavaScript.Document
public JavaScript.Document()
getClassName
public java.lang.String getClassName()
- Specified by:
getClassName
in interface org.mozilla.javascript.Scriptable
- Specified by:
getClassName
in class org.mozilla.javascript.ScriptableObject
clearCaches
public void clearCaches()
- Description copied from interface:
ScriptingEngine
- Clears any cached values, permitting them to be recomputed as needed.
- Specified by:
clearCaches
in interface ScriptingEngine
- Specified by:
clearCaches
in interface ScriptingHandler
jsGet_title
public java.lang.String jsGet_title()
throws org.xml.sax.SAXException
- Throws:
org.xml.sax.SAXException
jsGet_images
public org.mozilla.javascript.Scriptable jsGet_images()
throws org.xml.sax.SAXException
- Throws:
org.xml.sax.SAXException
jsGet_links
public org.mozilla.javascript.Scriptable jsGet_links()
throws org.xml.sax.SAXException
- Throws:
org.xml.sax.SAXException
jsGet_forms
public org.mozilla.javascript.Scriptable jsGet_forms()
throws org.xml.sax.SAXException
- Throws:
org.xml.sax.SAXException
jsFunction_getElementById
public java.lang.Object jsFunction_getElementById(java.lang.String id)
jsFunction_getElementsByName
public java.lang.Object jsFunction_getElementsByName(java.lang.String name)
jsFunction_getElementsByTagName
public java.lang.Object jsFunction_getElementsByTagName(java.lang.String name)
jsGet_location
public java.lang.Object jsGet_location()
jsSet_location
public void jsSet_location(java.lang.String urlString)
throws java.io.IOException,
org.xml.sax.SAXException
- Throws:
java.io.IOException
org.xml.sax.SAXException
jsGet_cookie
public java.lang.String jsGet_cookie()
jsSet_cookie
public void jsSet_cookie(java.lang.String cookieSpec)
jsFunction_open
public void jsFunction_open(java.lang.Object mimeType)
jsFunction_close
public void jsFunction_close()
jsFunction_write
public void jsFunction_write(java.lang.String string)
jsFunction_writeln
public void jsFunction_writeln(java.lang.String string)
getWriteBuffer
protected java.lang.StringBuffer getWriteBuffer()
clearWriteBuffer
protected void clearWriteBuffer()
handleEvent
public boolean handleEvent(java.lang.String eventName)
- get the event Handler script for the event e.g. onchange, onmousedown, onclick, onmouseup
execute the script if it's assigned by calling doEvent for the script
- Specified by:
handleEvent
in interface ScriptingEventHandler
- Overrides:
handleEvent
in class ScriptingEngineImpl
- Parameters:
eventName
-
- Returns:
has
public boolean has(java.lang.String propertyName,
org.mozilla.javascript.Scriptable scriptable)
- Specified by:
has
in interface org.mozilla.javascript.Scriptable
- Overrides:
has
in class org.mozilla.javascript.ScriptableObject
get
public java.lang.Object get(java.lang.String propertyName,
org.mozilla.javascript.Scriptable scriptable)
- Specified by:
get
in interface org.mozilla.javascript.Scriptable
- Overrides:
get
in class org.mozilla.javascript.ScriptableObject
get
public java.lang.Object get(int i,
org.mozilla.javascript.Scriptable scriptable)
- Specified by:
get
in interface org.mozilla.javascript.Scriptable
- Overrides:
get
in class org.mozilla.javascript.ScriptableObject
put
public void put(java.lang.String propertyName,
org.mozilla.javascript.Scriptable scriptable,
java.lang.Object value)
- Specified by:
put
in interface org.mozilla.javascript.Scriptable
- Overrides:
put
in class org.mozilla.javascript.ScriptableObject
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
newScriptingEngine
public ScriptingEngine newScriptingEngine(ScriptableDelegate child)
- Description copied from interface:
ScriptingEngine
- Returns a new scripting engine for the specified delegate.
toStringIfNotUndefined
protected static java.lang.String toStringIfNotUndefined(java.lang.Object object)
toElementArray
protected JavaScript.ElementArray toElementArray(ScriptingHandler[] scriptables)
Copyright © 2011. All Rights Reserved.