# OnParseBegin Event

## Applies to

THtmlViewer, TFrameViewer, and TFrameBrowser components

## Declaration

Type TParseEvent = procedure(Sender: TObject; var Source: string) of Object;

property OnParseBegin: TParseEvent;

## Description

The OnParseBegin event occurs just prior to parsing an HTML document.

SenderThe THtmlViewer doing the parsing.

SourceThe complete HTML document which will be parsed. This string may be saved, examined, and/or even modified. If the document were encrypted, this event could be used to unencrypt it.

Usage Restrictions

The TFrameViewer/TFrameBrowser Viewers property does not contain valid information at the time of the OnParseBegin event.

If the source is an image file, Source will contain an empty string.

This event does not provide any way to handle a linked Style Sheet document.

## See Also:

DocumentSource Property

OnParseEnd Event