public class Element extends EventNode
DomElement
.ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
Constructor and Description |
---|
Element() |
Modifier and Type | Method and Description |
---|---|
protected NamedNodeMap |
createAttributesObject()
Creates the JS object for the property attributes.
|
protected String |
fixAttributeName(String attributeName)
Allows subclasses to transform the attribute name before it gets used.
|
DomElement |
getDomNodeOrDie()
Returns the DOM node that corresponds to this JavaScript object or throw
an exception if one cannot be found.
|
Object |
jsxFunction_getAttribute(String attributeName,
Integer flags)
Returns the value of the specified attribute.
|
Object |
jsxFunction_getAttributeNode(String name)
Retrieves an attribute node by name.
|
Object |
jsxFunction_getElementsByTagName(String tagName)
Returns all the descendant elements with the specified tag name.
|
Object |
jsxFunction_getElementsByTagNameNS(Object namespaceURI,
String localName)
Returns a list of elements with the given tag name belonging to the given namespace.
|
boolean |
jsxFunction_hasAttribute(String name)
Returns true when an attribute with a given name is specified on this element or has a default value.
|
void |
jsxFunction_removeAttribute(String name)
Removes the specified attribute.
|
HTMLCollection |
jsxFunction_selectNodes(String expression)
Applies the specified XPath expression to this node's context and returns the generated list of matching nodes.
|
Object |
jsxFunction_selectSingleNode(String expression)
Applies the specified pattern-matching operation to this node's context and returns the first matching node.
|
void |
jsxFunction_setAttribute(String name,
String value)
Sets an attribute.
|
Object |
jsxGet_attributes()
Returns the attributes of this XML element.
|
String |
jsxGet_tagName()
Returns the tag name of this element.
|
String |
jsxGet_text()
Represents the text content of the node or the concatenated text representing the node and its descendants.
|
jsxFunction_fireEvent, jsxGet_onblur, jsxGet_onclick, jsxGet_oncontextmenu, jsxGet_ondblclick, jsxGet_onerror, jsxGet_onfocus, jsxGet_onfocusin, jsxGet_onfocusout, jsxGet_onkeydown, jsxGet_onkeypress, jsxGet_onkeyup, jsxGet_onmousedown, jsxGet_onmousemove, jsxGet_onmouseout, jsxGet_onmouseover, jsxGet_onmouseup, jsxGet_onpropertychange, jsxGet_onresize, jsxSet_onblur, jsxSet_onclick, jsxSet_oncontextmenu, jsxSet_ondblclick, jsxSet_onerror, jsxSet_onfocus, jsxSet_onfocusin, jsxSet_onfocusout, jsxSet_onkeydown, jsxSet_onkeypress, jsxSet_onkeyup, jsxSet_onmousedown, jsxSet_onmousemove, jsxSet_onmouseout, jsxSet_onmouseover, jsxSet_onmouseup, jsxSet_onpropertychange, jsxSet_onresize
executeEvent, fireEvent, getEventHandler, getEventHandlerProp, getJavaScriptNode, getParent, hasEventHandlers, jsxFunction_addEventListener, jsxFunction_appendChild, jsxFunction_attachEvent, jsxFunction_cloneNode, jsxFunction_compareDocumentPosition, jsxFunction_detachEvent, jsxFunction_hasChildNodes, jsxFunction_insertBefore, jsxFunction_insertBefore, jsxFunction_isSameNode, jsxFunction_normalize, jsxFunction_removeChild, jsxFunction_removeEventListener, jsxFunction_replaceChild, jsxGet_childNodes, jsxGet_firstChild, jsxGet_innerText, jsxGet_lastChild, jsxGet_localName, jsxGet_namespaceURI, jsxGet_nextSibling, jsxGet_nodeName, jsxGet_nodeType, jsxGet_nodeValue, jsxGet_ownerDocument, jsxGet_parentNode, jsxGet_prefix, jsxGet_previousSibling, jsxGet_textContent, jsxGet_xml, jsxSet_innerText, jsxSet_nodeValue, jsxSet_textContent, setDomNode, setEventHandler, setEventHandlerProp
clone, defineFunctionProperties, defineProperty, equivalentValues, get, getBrowserVersion, getClassName, getDefaultValue, getDomNodeOrNull, getPrototype, getScriptableFor, getStartingScope, getTransformerScriptableFor, getWindow, getWindow, getWithPreemption, hasInstance, initParentScope, makeScriptableFor, setCaseSensitive, setDomNode, setHtmlElement
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineOwnProperties, defineOwnProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setParentScope, setPrototype, size
public HTMLCollection jsxFunction_selectNodes(String expression)
expression
- a string specifying an XPath expressionpublic Object jsxFunction_selectSingleNode(String expression)
expression
- a string specifying an XPath expressionpublic final String jsxGet_tagName()
public Object jsxGet_attributes()
protected NamedNodeMap createAttributesObject()
public Object jsxFunction_getAttribute(String attributeName, Integer flags)
attributeName
- attribute nameflags
- IE-specific flags (see the MSDN documentation for more info)null
if the attribute is not definedprotected String fixAttributeName(String attributeName)
attributeName
- the original attributepublic void jsxFunction_setAttribute(String name, String value)
name
- Name of the attribute to setvalue
- Value to set the attribute topublic Object jsxFunction_getElementsByTagName(String tagName)
tagName
- the name to search forpublic Object jsxFunction_getAttributeNode(String name)
name
- the name of the attribute to retrievenull
if there is no such attributepublic String jsxGet_text()
public Object jsxFunction_getElementsByTagNameNS(Object namespaceURI, String localName)
namespaceURI
- the namespace URI of elements to look forlocalName
- is either the local name of elements to look for or the special value "*",
which matches all elements.public boolean jsxFunction_hasAttribute(String name)
name
- the name of the attribute to look forpublic DomElement getDomNodeOrDie()
getDomNodeOrDie
in class SimpleScriptable
public void jsxFunction_removeAttribute(String name)
name
- the name of the attribute to removeCopyright © 2002–2013 Gargoyle Software Inc.. All rights reserved.