mirror of https://github.com/sveltejs/svelte
parent
4603d7700f
commit
370327cccd
@ -1,19 +0,0 @@
|
|||||||
import { DomGenerator } from '../index';
|
|
||||||
import Block from '../Block';
|
|
||||||
import { State } from '../interfaces';
|
|
||||||
|
|
||||||
export default function visitYieldTag(
|
|
||||||
generator: DomGenerator,
|
|
||||||
block: Block,
|
|
||||||
state: State
|
|
||||||
) {
|
|
||||||
const parentNode = state.parentNode || '#target';
|
|
||||||
|
|
||||||
block.builders.mount.addLine(
|
|
||||||
`if ( #component._yield ) #component._yield.mount( ${parentNode}, null );`
|
|
||||||
);
|
|
||||||
|
|
||||||
block.builders.unmount.addLine(
|
|
||||||
`if ( #component._yield ) #component._yield.unmount();`
|
|
||||||
);
|
|
||||||
}
|
|
Loading…
Reference in new issue