Sign in Join
FPDoc Onlineexperiment

TDOMElement.IsEmpty function

Member of TDOMElementpublicIn unit Laz2_DOM

Indicates if the DOM Element does not have any content.

Declaration

pascal
function IsEmpty: Boolean; virtual

Function result

True when the DOM Element is empty.

Description

IsEmpty is a Boolean function used to determine if the DOM element does not have any content. The return value is True when Attributes has not been assigned (contains Nil) or has a Length / Count of 0.

Technically, this implementation is incorrect. An empty element is one which has no child Text or Element nodes. And, an empty element can have attributes values (default or specified). Use HasChildNodes instead.

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