Interface ParserOptions<T>

interface ParserOptions<T> {
    onParseError?: null | ParserErrorHandler;
    scriptingEnabled?: boolean;
    sourceCodeLocationInfo?: boolean;
    treeAdapter?: TreeAdapter<T>;
}

Type Parameters

Properties

onParseError?: null | ParserErrorHandler

Callback for parse errors.

null

scriptingEnabled?: boolean

The scripting flag. If set to true, noscript element content will be parsed as text.

true

sourceCodeLocationInfo?: boolean

Enables source code location information. When enabled, each node (except the root node) will have a sourceCodeLocation property. If the node is not an empty element, sourceCodeLocation will be a ElementLocation object, otherwise it will be Location. If the element was implicitly created by the parser (as part of tree correction), its sourceCodeLocation property will be undefined.

false

treeAdapter?: TreeAdapter<T>

Specifies the resulting tree format.

treeAdapters.default