public class Attr extends Node
Attr.org.htmlunit.corejs.javascript.ScriptableObject.DescriptorInfo, org.htmlunit.corejs.javascript.ScriptableObject.KeyComparator, org.htmlunit.corejs.javascript.ScriptableObject.LambdaGetterFunction, org.htmlunit.corejs.javascript.ScriptableObject.LambdaSetterFunctionATTRIBUTE_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_NODECONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONSTNOT_FOUND| Constructor and Description |
|---|
Attr() |
| Modifier and Type | Method and Description |
|---|---|
void |
detachFromParent()
Detaches this attribute from the parent HTML element after caching the attribute value.
|
DomAttr |
getDomNodeOrDie()
Returns the DOM node that corresponds to this JavaScript object or throw
an exception if one cannot be found.
|
Node |
getFirstChild()
Gets the JavaScript property
firstChild for the node that
contains the current node. |
Node |
getLastChild()
Gets the JavaScript property
lastChild for the node that
contains the current node. |
String |
getLocalName()
Returns the local name of this attribute.
|
String |
getName()
Returns the name of the attribute.
|
String |
getNamespaceURI()
Returns the URI that identifies an XML namespace.
|
String |
getNodeValue()
Returns the value of this attribute.
|
HtmlUnitScriptable |
getOwnerElement()
Returns the owner element.
|
Node |
getParentNode()
Gets the JavaScript property
parentNode for the node that
contains the current node. |
String |
getPrefix()
Returns the namespace prefix.
|
Node |
getRootNode()
Returns the owner document.
|
String |
getValue()
Returns the value of this attribute.
|
boolean |
isSpecified()
Returns
true if this attribute has been specified. |
void |
jsConstructor()
JavaScript constructor.
|
void |
setValue(String value)
Sets the value of this attribute.
|
after, append, appendChild, before, cloneNode, compareDocumentPosition, contains, getAttributes, getBaseURI, getChildElementCount, getChildNodes, getChildren, getFirstElementChild, getJavaScriptNode, getLastElementChild, getNextSibling, getNodeName, getNodeType, getOwnerDocument, getParent, getParentElement, getPreviousSibling, getTextContent, hasAttributes, hasChildNodes, insertBefore, insertBeforeImpl, isEqualNode, isSameNode, lookupPrefix, normalize, prepend, remove, removeChild, replaceChild, replaceChildren, replaceWith, setNodeValue, setTextContentaddEventListener, clearEventListenersContainer, dispatchEvent, executeEventLocally, fireEvent, getEventHandler, getEventListenersContainer, hasEventHandlers, isEventHandlerOnWindow, removeEventListener, setEventHandlerclone, equivalentValues, get, getBrowserVersion, getClassName, getDefaultValue, getDomNodeOrNull, getPrototype, getScriptableFor, getWindow, getWindow, getWindowFromTopCallScope, getWithPreemption, has, hasInstance, initParentScope, makeScriptableFor, put, setClassName, setDomNode, setDomNode, setParentScope, setupPromise, setupRejectedPromiseapplyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkNotSealed, checkPropertyChangeForSlot, checkPropertyChangeForSlot, checkPropertyDefinition, checkSlotRemoval, defineBuiltInProperty, defineBuiltInProperty, defineBuiltInProperty, defineBuiltInProperty, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureScriptableObjectButNotSymbol, ensureSymbolScriptable, ensureType, get, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getSuperProperty, getSuperProperty, getSuperProperty, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, putConst, putConstProperty, putOwnProperty, putOwnProperty, putOwnProperty, putProperty, putProperty, putProperty, putSuperProperty, putSuperProperty, putSuperProperty, querySlot, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, setCommonDescriptorProperties, setExternalArrayData, setGetterOrSetter, setPrototype, sizecreateSlotMappublic void jsConstructor()
jsConstructor in class Nodepublic void detachFromParent()
public String getName()
public String getNodeValue()
getNodeValue in class Nodepublic HtmlUnitScriptable getOwnerElement()
public Node getParentNode()
parentNode for the node that
contains the current node.getParentNode in class Nodenullpublic boolean isSpecified()
true if this attribute has been specified.true if this attribute has been specifiedpublic String getValue()
public void setValue(String value)
value - the new value of this attributepublic Node getFirstChild()
firstChild for the node that
contains the current node.getFirstChild in class Nodepublic Node getLastChild()
lastChild for the node that
contains the current node.getLastChild in class Nodepublic DomAttr getDomNodeOrDie()
getDomNodeOrDie in class HtmlUnitScriptablepublic String getPrefix()
public String getLocalName()
getLocalName in class Nodepublic String getNamespaceURI()
getNamespaceURI in class Nodepublic Node getRootNode()
getRootNode in class NodeCopyright © 2002–2025 Gargoyle Software Inc.. All rights reserved.