|
|||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mozilla.javascript.ScriptableObject
com.gargoylesoftware.htmlunit.javascript.SimpleScriptable
com.gargoylesoftware.htmlunit.javascript.host.NodeImpl
public class NodeImpl
The javascript object "NodeImpl" which is the base class for all DOM
objects. This will typically wrap an instance of DomNode
.
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 | |
---|---|
NodeImpl()
Create an instance. |
Method Summary | |
---|---|
ScriptResult |
executeEvent(Event event)
Execute the event on this object only (needed for instance for onload on (i)frame tags) |
ScriptResult |
fireEvent(Event event)
Fires the event on the node with capturing and bubbling phase |
org.mozilla.javascript.Function |
getEventHandler(java.lang.String eventName)
Gets an event handler |
void |
jsxFunction_addEventListener(java.lang.String type,
org.mozilla.javascript.Function listener,
boolean useCapture)
Allows the registration of event listeners on the event target. |
java.lang.Object |
jsxFunction_appendChild(java.lang.Object childObject)
Add a DOM node to the node |
boolean |
jsxFunction_attachEvent(java.lang.String type,
org.mozilla.javascript.Function listener)
Allows the registration of event listeners on the event target. |
java.lang.Object |
jsxFunction_cloneNode(boolean deep)
Duplicate an XML node |
void |
jsxFunction_detachEvent(java.lang.String type,
org.mozilla.javascript.Function listener)
Allows the removal of event listeners on the event target. |
boolean |
jsxFunction_hasChildNodes()
Returns whether this node has any children. |
java.lang.Object |
jsxFunction_insertBefore(java.lang.Object newChildObject,
java.lang.Object refChildObject)
Add a DOM node as a child to this node before the referenced node. |
boolean |
jsxFunction_isSameNode(java.lang.Object other)
This method provides a way to determine whether two Node references returned by the implementation reference the same object. |
java.lang.Object |
jsxFunction_removeChild(java.lang.Object childObject)
Remove a DOM node from this node |
void |
jsxFunction_removeEventListener(java.lang.String type,
org.mozilla.javascript.Function listener,
boolean useCapture)
Allows the removal of event listeners on the event target. |
java.lang.Object |
jsxFunction_replaceChild(java.lang.Object newChildObject,
java.lang.Object oldChildObject)
Replace a child DOM node with another DOM node. |
java.lang.Object |
jsxGet_childNodes()
Returns the child nodes of the current element. |
java.lang.Object |
jsxGet_firstChild()
Get the JavaScript property "firstChild" for the node that contains the current node. |
java.lang.Object |
jsxGet_lastChild()
Get the JavaScript property "lastChild" for the node that contains the current node. |
java.lang.Object |
jsxGet_nextSibling()
Get the JavaScript property "nextSibling" for the node that contains the current node. |
java.lang.String |
jsxGet_nodeName()
Get the JavaScript property "nodeName" for the current node. |
short |
jsxGet_nodeType()
Get the JavaScript property "nodeType" for the current node. |
java.lang.String |
jsxGet_nodeValue()
Get the JavaScript property "nodeValue" for the current node. |
java.lang.Object |
jsxGet_parentNode()
Get the JavaScript property "parentNode" for the node that contains the current node. |
java.lang.Object |
jsxGet_previousSibling()
Get the JavaScript property "previousSibling" for the node that contains the current node. |
void |
jsxSet_nodeValue(java.lang.String newValue)
Set the JavaScript property "nodeValue" for the current node. |
void |
setEventHandler(java.lang.String eventName,
org.mozilla.javascript.Function eventHandler)
Defines an event handler |
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.SimpleScriptable |
---|
get, getBooleanArg, getClassName, 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 |
---|
public NodeImpl()
Method Detail |
---|
public ScriptResult executeEvent(Event event)
event
- the event
public ScriptResult fireEvent(Event event)
event
- the event
public org.mozilla.javascript.Function getEventHandler(java.lang.String eventName)
eventName
- the event name (ex: "onclick")
null
if the property is null or not a functionpublic void jsxFunction_addEventListener(java.lang.String type, org.mozilla.javascript.Function listener, boolean useCapture)
type
- the event type to listen for (like "click")listener
- the event listeneruseCapture
- If true
, indicates that the user wishes to initiate capturepublic java.lang.Object jsxFunction_appendChild(java.lang.Object childObject)
childObject
- The node to add to this node
public boolean jsxFunction_attachEvent(java.lang.String type, org.mozilla.javascript.Function listener)
type
- the event type to listen for (like "onclick")listener
- the event listener
true
if the listener has been addedpublic java.lang.Object jsxFunction_cloneNode(boolean deep)
deep
- If true, recursively clone all descendants. Otherwise,
just clone this node.
public void jsxFunction_detachEvent(java.lang.String type, org.mozilla.javascript.Function listener)
type
- the event type to listen for (like "onclick")listener
- the event listenerpublic boolean jsxFunction_hasChildNodes()
public java.lang.Object jsxFunction_insertBefore(java.lang.Object newChildObject, java.lang.Object refChildObject)
newChildObject
- The node to add to this noderefChildObject
- The node before which to add the new child
public boolean jsxFunction_isSameNode(java.lang.Object other)
other
- The node to test against.
public java.lang.Object jsxFunction_removeChild(java.lang.Object childObject)
childObject
- The node to remove from this node
public void jsxFunction_removeEventListener(java.lang.String type, org.mozilla.javascript.Function listener, boolean useCapture)
type
- the event type to listen for (like "click")listener
- the event listeneruseCapture
- If true
, indicates that the user wishes to initiate capture (not yet implemented)public java.lang.Object jsxFunction_replaceChild(java.lang.Object newChildObject, java.lang.Object oldChildObject)
newChildObject
- The node to add as a child of this nodeoldChildObject
- The node to remove as a child of this node
public java.lang.Object jsxGet_childNodes()
public java.lang.Object jsxGet_firstChild()
public java.lang.Object jsxGet_lastChild()
public java.lang.Object jsxGet_nextSibling()
public java.lang.String jsxGet_nodeName()
public short jsxGet_nodeType()
public java.lang.String jsxGet_nodeValue()
public java.lang.Object jsxGet_parentNode()
public java.lang.Object jsxGet_previousSibling()
public void jsxSet_nodeValue(java.lang.String newValue)
newValue
- The new node valuepublic void setEventHandler(java.lang.String eventName, org.mozilla.javascript.Function eventHandler)
eventName
- the event name (like "onclick")eventHandler
- the handler (null
to reset it)
|
|||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |