Module Parser.Insertion_mode

Parser insertion modes.

Insertion modes are the states of the tree construction state machine. They determine how each token from the tokenizer should be processed based on the current document context.

For example, a <td> tag is handled differently depending on whether the parser is currently in a table context or in the body.

type t

The insertion mode type. Values include modes like initial, before_html, in_head, in_body, in_table, etc.