List of events emitted during the parsing
During the parsing, LagartoParser calls various callback methods of provided
Invoked before and after the content is parsed.
Callback invoked on a block of plain text.
text()is called for all text blocks, including the whitespaces and indentations.
Invoked on an HTML comment. The argument contains the comment content, without the tag boundaries.
Callback invoked foo all HTML tags: open, close, or an empty tag. The argument is a
Taginstance, containing various information about the tag: tags name, attributes, depth level, etc.
Taginstance is reused during HTML parsing for better performances! The same
Taginstance is passed to all callback methods and for every detected HTML tag. Do not store it internally!
Invoked on all
scripttags. The callback method receives the script Tag instance and the script body.
Callback for the
These two callbacks are invoked for XML-specific tags when parsing the XML content.
Every error is reported by visiting this method. Depending on the configuration, the error message would contain the exact error position or not.