File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed
tests/runtime-runes/samples/snippet-raw-args Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -170,7 +170,7 @@ export function createRawSnippet({ render }) {
170
170
payload . out += body ;
171
171
}
172
172
if ( head ) {
173
- payload . head . out += body ;
173
+ payload . head . out += head ;
174
174
}
175
175
} ;
176
176
add_snippet_symbol ( snippet_fn ) ;
Original file line number Diff line number Diff line change @@ -5,13 +5,13 @@ export default test({
5
5
compileOptions : {
6
6
dev : true // Render in dev mode to check that the validation error is not thrown
7
7
} ,
8
- html : `<div><div>0</div> </div><button>+</button>` ,
8
+ html : `<div>0 </div><button>+</button>` ,
9
9
10
10
test ( { assert, target } ) {
11
11
const [ b1 ] = target . querySelectorAll ( 'button' ) ;
12
12
13
13
b1 ?. click ( ) ;
14
14
flushSync ( ) ;
15
- assert . htmlEqual ( target . innerHTML , `<div><div>1</div> </div><button>+</button>` ) ;
15
+ assert . htmlEqual ( target . innerHTML , `<div>1 </div><button>+</button>` ) ;
16
16
}
17
17
} ) ;
Original file line number Diff line number Diff line change @@ -371,7 +371,10 @@ declare module 'svelte' {
371
371
export function createRawSnippet ( { mount, hydrate } : {
372
372
mount : ( ...params : any [ ] ) => Element ;
373
373
hydrate ?: ( element : Element , ...params : any [ ] ) => void ;
374
- render : ( ...params : any [ ] ) => string ;
374
+ render : ( ...params : any [ ] ) => {
375
+ head : string ;
376
+ body : string ;
377
+ } ;
375
378
} ) : ( anchor : TemplateNode , ...params : any [ ] ) => void ;
376
379
/**
377
380
* Mounts a component to the given target and returns the exports and potentially the props (if compiled with `accessors: true`) of the component.
You can’t perform that action at this time.
0 commit comments