TDOMElement.SetAttribute procedure
Sets the value in the AttribStrings property.
Declaration
procedure SetAttribute(const name: DOMString; const value: DOMString)Arguments
name | Name of the DOM Attribute updated in the method. |
value | New value for the attribute in the AttribStrings property. |
Description
SetAttribute is a method used to set the value for an attribute in
the indexed
AttribStrings property. It calls
Changing
to ensure that the DOM Element is not marked as read-only. An
EDOMError exception is raised if the element cannot be modified.
SetAttribute locates the TDOMAttr in the Attributes
property with the name specified in the name argument. If it is
not found, a new TDomAttr instance is created with the required name and
added to Attributes. SetAttribute stores the value argument as the
NodeValue for the attribute instance.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
