[All Packages] [This Package] [Next Class]
Class: Attr
This class contains methods for accessing the name and value of a single
document node attribute.


getName
- Function:
- Return name of attribute
- Prototype:
- DOMString getName()
- Arguments:
- None
- Returns:
- DOMString -- Name of attribute
getValue
- Function:
- Return "value" (definition) of attribute
- Prototype:
- DOMString getValue()
- Arguments:
- None
- Returns:
- Value of attribute
getSpecified
- Function:
- Return value of attribute's "specified" flag. The DOM says:
- If this attribute was explicitly given a value in the
original document, this is true; otherwise, it is false. Note
that the implementation is in charge of this attribute, not
the user. If the user changes the value of the attribute
(even if it ends up having the same value as the default
value) then the specified flag is automatically flipped to
true. To re-specify the attribute as the default value from
the DTD, the user must delete the attribute. The
implementation will then make a new attribute available with
specified set to false and the default value (if one exists).
- Prototype:
- boolean getSpecified()
- Arguments:
- None
- Returns:
- Value of specified flag
setValue
- Function:
- Sets an attribute's "value"
- Prototype:
- void setValue(DOMString value)
- Arguments:
- value -- Attribute's new value
- Returns:
- Value of attribute