Class EventHandler
java.lang.Object
org.htmlunit.corejs.javascript.ScriptableObject
org.htmlunit.corejs.javascript.IdScriptableObject
org.htmlunit.corejs.javascript.BaseFunction
org.htmlunit.javascript.host.event.EventHandler
- All Implemented Interfaces:
Serializable, org.htmlunit.corejs.javascript.Callable, org.htmlunit.corejs.javascript.ConstProperties, org.htmlunit.corejs.javascript.Constructable, org.htmlunit.corejs.javascript.debug.DebuggableObject, org.htmlunit.corejs.javascript.Function, org.htmlunit.corejs.javascript.IdFunctionCall, org.htmlunit.corejs.javascript.Scriptable, org.htmlunit.corejs.javascript.SymbolScriptable
public class EventHandler
extends org.htmlunit.corejs.javascript.BaseFunction
Allows to wrap event handler code as Function object.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.htmlunit.corejs.javascript.ScriptableObject
org.htmlunit.corejs.javascript.ScriptableObject.KeyComparator -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Stringprivate final Stringprivate final DomNodeprivate org.htmlunit.corejs.javascript.FunctionFields inherited from class org.htmlunit.corejs.javascript.BaseFunction
Id_arguments, Id_arity, Id_length, Id_name, Id_prototype, MAX_INSTANCE_IDFields inherited from class org.htmlunit.corejs.javascript.ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONSTFields inherited from interface org.htmlunit.corejs.javascript.Scriptable
NOT_FOUND -
Constructor Summary
ConstructorsConstructorDescriptionEventHandler(DomNode node, String eventName, String jsSnippet) Builds a function that will execute the JavaScript code provided. -
Method Summary
Modifier and TypeMethodDescriptioncall(org.htmlunit.corejs.javascript.Context cx, org.htmlunit.corejs.javascript.Scriptable scope, org.htmlunit.corejs.javascript.Scriptable thisObj, Object[] args) getDefaultValue(Class<?> typeHint) Methods inherited from class org.htmlunit.corejs.javascript.BaseFunction
construct, createObject, execIdCall, fillConstructorProperties, findInstanceIdInfo, findPrototypeId, getArity, getClassName, getClassPrototype, getFunctionName, getInstanceIdName, getInstanceIdValue, getLength, getMaxInstanceId, getPrototypeProperty, getTypeOf, hasInstance, hasPrototypeProperty, initPrototypeId, isGeneratorFunction, setImmunePrototypeProperty, setInstanceIdAttributes, setInstanceIdValue, setPrototypeProperty, setPrototypePropertyAttributes, setStandardPropertyAttributes, setupDefaultPrototypeMethods inherited from class org.htmlunit.corejs.javascript.IdScriptableObject
activatePrototypeMap, addIdFunctionProperty, defaultGet, defaultHas, defaultPut, defineOwnProperty, delete, delete, ensureType, exportAsJSClass, findInstanceIdInfo, findPrototypeId, get, getAttributes, getAttributes, getOwnPropertyDescriptor, has, has, hasPrototypeMap, initPrototypeConstructor, initPrototypeMethod, initPrototypeMethod, initPrototypeMethod, initPrototypeValue, initPrototypeValue, instanceIdInfo, put, put, setAttributesMethods inherited from class org.htmlunit.corejs.javascript.ScriptableObject
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, deleteProperty, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureSymbolScriptable, equivalentValues, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, has, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, putConst, putConstProperty, putProperty, putProperty, putProperty, querySlot, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setCommonDescriptorProperties, setExternalArrayData, setGetterOrSetter, setParentScope, setPrototype, sizeMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.htmlunit.corejs.javascript.Scriptable
delete, delete, get, getIds, getParentScope, getPrototype, has, has, put, put, setParentScope, setPrototype
-
Field Details
-
node_
-
eventName_
-
jsSnippet_
-
realFunction_
private org.htmlunit.corejs.javascript.Function realFunction_
-
-
Constructor Details
-
EventHandler
-
-
Method Details
-
call
public Object call(org.htmlunit.corejs.javascript.Context cx, org.htmlunit.corejs.javascript.Scriptable scope, org.htmlunit.corejs.javascript.Scriptable thisObj, Object[] args) throws org.htmlunit.corejs.javascript.JavaScriptException - Specified by:
callin interfaceorg.htmlunit.corejs.javascript.Callable- Specified by:
callin interfaceorg.htmlunit.corejs.javascript.Function- Overrides:
callin classorg.htmlunit.corejs.javascript.BaseFunction- Throws:
org.htmlunit.corejs.javascript.JavaScriptException
-
getDefaultValue
- Specified by:
getDefaultValuein interfaceorg.htmlunit.corejs.javascript.Scriptable- Overrides:
getDefaultValuein classorg.htmlunit.corejs.javascript.ScriptableObject- Parameters:
typeHint- the type hint- Returns:
- the js code of the function declaration
- See Also:
-
get
-