Sign in Join
FPDoc Onlineexperiment

TDOMElement.AttribStrings property

Member of TDOMElementpublicIn unit Laz2_DOM

Provides indexed access to Attributes and their value as a String.

Declaration

pascal
property AttribStrings[Name: DOMString]: DOMString read GetAttribute write SetAttribute; default;

Description

AttribStrings is an indexed DOMString property that provides access to the value for a DOM Attribute by its Name. AttribStrings is an extension to the DOM specification. It provides a simpler mechanism for reading and writing Attribute values than the methods provided in the DOM Node interface. It is especially useful for DOM documents where Attributes are known to contain simple DOMString data types (like HTML).

Read and write access to AttribStrings is redirected to the Attributes property. When reading a DOM Attribute, the value is an empty string ('') if the Attributes property does not contain an Attribute node with the requested Name. When writing a DOM Attribute, the Attribute node is created if it does not exist already.

AttribStrings does not take Qualified names or Namespaces into consideration when accessing values in the Attributes property. Use the GetAttributeNS, SetAttributeNS, or RemoveAttributeNS methods when Namespace support is required for DOM Attributes.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.