MCPcopy
hub / github.com/vuejs/core / transformWithVHtml

Function transformWithVHtml

packages/compiler-dom/__tests__/transforms/vHtml.spec.ts:13–23  ·  view source on GitHub ↗
(template: string, options: CompilerOptions = {})

Source from the content-addressed store, hash-verified

11import { DOMErrorCodes } from '../../src/errors'
12
13function transformWithVHtml(template: string, options: CompilerOptions = {}) {
14 const ast = parse(template)
15 transform(ast, {
16 nodeTransforms: [transformElement],
17 directiveTransforms: {
18 html: transformVHtml,
19 },
20 ...options,
21 })
22 return ast
23}
24
25describe('compiler: v-html transform', () => {
26 it('should convert v-html to innerHTML', () => {

Callers 1

vHtml.spec.tsFile · 0.85

Calls 2

transformFunction · 0.90
parseFunction · 0.50

Tested by

no test coverage detected