svelte/compiler/generate/visitors/Text.js

7 lines
197 B

export default {
enter ( generator, node ) {
const name = generator.current.counter( `text` );
generator.addElement( name, `document.createTextNode( ${JSON.stringify( node.data )} )` );
}
};