|
|
@ -25,6 +25,8 @@ export class DomGenerator extends Generator {
|
|
|
|
hasOutroTransitions: boolean;
|
|
|
|
hasOutroTransitions: boolean;
|
|
|
|
hasComplexBindings: boolean;
|
|
|
|
hasComplexBindings: boolean;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
needsEncapsulateHelper: boolean;
|
|
|
|
|
|
|
|
|
|
|
|
constructor(
|
|
|
|
constructor(
|
|
|
|
parsed: Parsed,
|
|
|
|
parsed: Parsed,
|
|
|
|
source: string,
|
|
|
|
source: string,
|
|
|
@ -38,6 +40,7 @@ export class DomGenerator extends Generator {
|
|
|
|
this.readonly = new Set();
|
|
|
|
this.readonly = new Set();
|
|
|
|
|
|
|
|
|
|
|
|
this.hydratable = options.hydratable;
|
|
|
|
this.hydratable = options.hydratable;
|
|
|
|
|
|
|
|
this.needsEncapsulateHelper = false;
|
|
|
|
|
|
|
|
|
|
|
|
// initial values for e.g. window.innerWidth, if there's a <:Window> meta tag
|
|
|
|
// initial values for e.g. window.innerWidth, if there's a <:Window> meta tag
|
|
|
|
this.metaBindings = [];
|
|
|
|
this.metaBindings = [];
|
|
|
@ -131,6 +134,14 @@ export default function dom(
|
|
|
|
builder.addBlock(`[✂${parsed.js.content.start}-${parsed.js.content.end}✂]`);
|
|
|
|
builder.addBlock(`[✂${parsed.js.content.start}-${parsed.js.content.end}✂]`);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (generator.needsEncapsulateHelper) {
|
|
|
|
|
|
|
|
builder.addBlock(deindent`
|
|
|
|
|
|
|
|
function @encapsulateStyles ( node ) {
|
|
|
|
|
|
|
|
@setAttribute( node, '${generator.stylesheet.id}', '' );
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
`);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (generator.stylesheet.hasStyles && options.css !== false) {
|
|
|
|
if (generator.stylesheet.hasStyles && options.css !== false) {
|
|
|
|
const { css, cssMap } = generator.stylesheet.render(options.filename);
|
|
|
|
const { css, cssMap } = generator.stylesheet.render(options.filename);
|
|
|
|
|
|
|
|
|
|
|
|