You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/src/generators/nodes/Document.ts

27 lines
559 B

import deindent from '../../utils/deindent';
import { stringify } from '../../utils/stringify';
import Node from './shared/Node';
import Block from '../dom/Block';
import Attribute from './Attribute';
export default class Document extends Node {
type: 'Document';
attributes: Attribute[];
build(
block: Block,
parentNode: string,
parentNodes: string
) {
const { generator } = this;
this.var = 'document';
this.attributes.forEach((attribute: Attribute) => {
if (attribute.name === 'title') {
attribute.render(block);
}
});
}
}