ParserOptions
interface ParserOptions extends ErrorHandlingOptions, CompilerCompatOptions {
comments?: boolean;
decodeEntities?: (rawText: string, asAttr: boolean) => string;
delimiters?: [string, string];
getNamespace?: (tag: string, parent: ElementNode | undefined) => Namespace;
getTextMode?: (node: ElementNode, parent: ElementNode | undefined) => TextModes;
isBuiltInComponent?: (tag: string) => symbol | void;
isCustomElement?: (tag: string) => boolean | void;
isNativeTag?: (tag: string) => boolean;
isPreTag?: (tag: string) => boolean;
isVoidTag?: (tag: string) => boolean;
whitespace?: "preserve" | "condense";
}§Properties
§
comments?: boolean
[src]Whether to keep comments in the templates AST.
This defaults to true
in development and false
in production builds.
§
getNamespace?: (tag: string, parent: ElementNode | undefined) => Namespace
[src]Get tag namespace
§
getTextMode?: (node: ElementNode, parent: ElementNode | undefined) => TextModes
[src]Get text parsing mode for this element
§
isBuiltInComponent?: (tag: string) => symbol | void
[src]Platform-specific built-in components e.g. <Transition>
§
isCustomElement?: (tag: string) => boolean | void
[src]Separate option for end users to extend the native elements list
§
isPreTag?: (tag: string) => boolean
[src]e.g. elements that should preserve whitespace inside, e.g. <pre>