Interface ParserOptions<T>

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

Type Parameters

Properties

onParseError?: null | ParserErrorHandler

Callback for parse errors.

Default

null

scriptingEnabled?: boolean

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

Default

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.

Default

false

treeAdapter?: TreeAdapter<T>

Specifies the resulting tree format.

Default

treeAdapters.default

Generated using TypeDoc