ThtObjectEvent = procedure(Sender, Obj: TObject; const Attribute: string) of Object;
The ThtObjectEvent type is the type for OnObjectFocus, OnObjectBlur, and OnObjectChange events.
In the above, SenderThe THtmlViewer where the Object is located and Obj is a pointer to the clicked object.
Attribute is the string assigned to the OnFocus, OnBlur, or OnChange attribute of the object's HTML tag.
Form controls currently support these events. Form controls are descendents of TFormControlObj. In particular, the TheControl property can give access to the underlying Delphi controls, such as TEdit, TButton, and TCheckbox with code similar to:
if (Obj is TFormControlObj) then with TFormControlObj(Obj) do if (TheControl is TButton) then .....
TFormControlObj's base class THtmlNode also has an AttributeValue Property with which special user attributes can be accessed:
if (Obj is THtmlNode) then AttrValue := THtmlNode(Obj).AttributeValue['MyAttr'];
See also: