File tree Expand file tree Collapse file tree 6 files changed +39
-0
lines changed
src/compiler/compile/render_dom/wrappers/shared
test/runtime/samples/component-slot-fallback-6 Expand file tree Collapse file tree 6 files changed +39
-0
lines changed Original file line number Diff line number Diff line change 1111* Fix using ` <svelte:component> ` in ` {:catch} ` ([ #5259 ] ( https://github.com/sveltejs/svelte/issues/5259 ) )
1212* Fix setting one-way bound ` <input> ` ` value ` to ` undefined ` when it has spread attributes ([ #5270 ] ( https://github.com/sveltejs/svelte/issues/5270 ) )
1313* Fix deep two-way bindings inside an ` {#each} ` involving a store ([ #5286 ] ( https://github.com/sveltejs/svelte/issues/5286 ) )
14+ * Fix reactivity of ` $$props ` in slot fallback content ([ #5367 ] ( https://github.com/sveltejs/svelte/issues/5367 ) )
1415
1516## 3.24.1
1617
Original file line number Diff line number Diff line change 11import { Var } from '../../../../interfaces' ;
2+ import { is_reserved_keyword } from '../../../utils/reserved_keywords' ;
23
34export default function is_dynamic ( variable : Var ) {
45 if ( variable ) {
56 if ( variable . mutated || variable . reassigned ) return true ; // dynamic internal state
67 if ( ! variable . module && variable . writable && variable . export_name ) return true ; // writable props
8+ if ( is_reserved_keyword ( variable . name ) ) return true ;
79 }
810
911 return false ;
Original file line number Diff line number Diff line change 1+ <slot />
Original file line number Diff line number Diff line change 1+ <script >
2+ import Foo from ' ./Foo.svelte' ;
3+ </script >
4+
5+ <Foo >
6+ <slot >
7+ {JSON .stringify ($$props )}
8+ </slot >
9+ </Foo >
Original file line number Diff line number Diff line change 1+ // $$props reactivity in slot fallback
2+ export default {
3+ html : `
4+ <input>
5+ {"value":""}
6+ ` ,
7+
8+ async test ( { assert, target, window } ) {
9+ const input = target . querySelector ( "input" ) ;
10+ input . value = "abc" ;
11+ await input . dispatchEvent ( new window . Event ( 'input' ) ) ;
12+
13+ assert . htmlEqual ( target . innerHTML , `
14+ <input>
15+ {"value":"abc"}
16+ ` ) ;
17+ }
18+ } ;
Original file line number Diff line number Diff line change 1+ <script >
2+ import Inner from " ./Inner.svelte" ;
3+ let value = ' ' ;
4+ </script >
5+
6+ <input bind:value />
7+
8+ <Inner {value } />
You can’t perform that action at this time.
0 commit comments