com.gargoylesoftware.htmlunit.javascript.host
Class ActiveXObject

java.lang.Object
  extended by org.mozilla.javascript.ScriptableObject
      extended by com.gargoylesoftware.htmlunit.javascript.SimpleScriptable
          extended by com.gargoylesoftware.htmlunit.javascript.host.ActiveXObject
All Implemented Interfaces:
java.io.Serializable, org.mozilla.javascript.ConstProperties, org.mozilla.javascript.debug.DebuggableObject, org.mozilla.javascript.Scriptable

public class ActiveXObject
extends SimpleScriptable

This is the host object that allows javascript to instantiate java objects via the ActiveXObject constructor. This host object enables a person to emulate ActiveXObjects in javascript with java objects. See the WebClient class to see how ActiveXObject string parameter specifies which java class is instantiated.

Version:
$Revision: 1.3 $
Author:
Ben Curren
See Also:
WebClient, Serialized Form

Field Summary
 
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
 
Constructor Summary
ActiveXObject()
 The default constructor.
 
Method Summary
 java.lang.String getClassName()
 Get the name of the host object class.
static org.mozilla.javascript.Scriptable jsConstructor(org.mozilla.javascript.Context cx, java.lang.Object[] args, org.mozilla.javascript.Function ctorObj, boolean inNewExpr)
 This method searches the map specified in the WebClient class for the java object to instantiate based on the ActiveXObject constructor String.
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.SimpleScriptable
get, getBooleanArg, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getHtmlElementOrDie, getHtmlElementOrNull, getIntArg, getObjectArg, getStringArg, makeScriptableFor, setDomNode, setHtmlElement
 
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, get, getAllIds, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, has, has, hasInstance, hasProperty, hasProperty, isConst, isSealed, put, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setParentScope, setPrototype
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActiveXObject

public ActiveXObject()
The default constructor.

Method Detail

getClassName

public java.lang.String getClassName()
Get the name of the host object class.

Specified by:
getClassName in interface org.mozilla.javascript.Scriptable
Overrides:
getClassName in class SimpleScriptable
Returns:
the javascript class name

jsConstructor

public static org.mozilla.javascript.Scriptable jsConstructor(org.mozilla.javascript.Context cx,
                                                              java.lang.Object[] args,
                                                              org.mozilla.javascript.Function ctorObj,
                                                              boolean inNewExpr)
This method searches the map specified in the WebClient class for the java object to instantiate based on the ActiveXObject constructor String.

Parameters:
cx - The current context
args - The arguments to the ActiveXObject constructor
ctorObj - The function object
inNewExpr - Is new or not
Returns:
the java object to allow javascript to access


Copyright © 2003-2016 AppPerfect Corporation. All Rights Reserved.