From 9dbc571f57be5cfe00b720210b08533bcf8606f9 Mon Sep 17 00:00:00 2001 From: Andrew Worcester Date: Fri, 25 Aug 2017 11:52:09 -0400 Subject: [PATCH] allow an anchor element to be passed for initial component bootstrap --- src/generators/dom/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generators/dom/index.ts b/src/generators/dom/index.ts index 98040fc8f5..4e20b28e3d 100644 --- a/src/generators/dom/index.ts +++ b/src/generators/dom/index.ts @@ -213,7 +213,7 @@ export default function dom( ${options.dev && `if ( options.hydrate ) throw new Error( 'options.hydrate only works if the component was compiled with the \`hydratable: true\` option' );`} this._fragment.create(); `} - this._fragment.${block.hasIntroMethod ? 'intro' : 'mount'}( options.target, null ); + this._fragment.${block.hasIntroMethod ? 'intro' : 'mount'}( options.target, options.anchor || null ); } ${(generator.hasComponents || generator.hasComplexBindings || templateProperties.oncreate || generator.hasIntroTransitions) && deindent`