mirror of https://github.com/sveltejs/svelte
				
				
				
			fix: only emit binding_property_non_reactive warning in runes mode (#12544)
	
		
	
				
					
				
			
							parent
							
								
									fd5cfd77d8
								
							
						
					
					
						commit
						73ac4fe456
					
				| @ -0,0 +1,5 @@ | ||||
| --- | ||||
| 'svelte': patch | ||||
| --- | ||||
| 
 | ||||
| fix: only emit binding_property_non_reactive warning in runes mode | ||||
| @ -0,0 +1,23 @@ | ||||
| import { flushSync } from 'svelte'; | ||||
| import { ok, test } from '../../test'; | ||||
| 
 | ||||
| export default test({ | ||||
| 	compileOptions: { | ||||
| 		dev: true | ||||
| 	}, | ||||
| 
 | ||||
| 	test({ assert, target, window }) { | ||||
| 		assert.htmlEqual(target.innerHTML, `<input><p>hello</p>`); | ||||
| 
 | ||||
| 		const input = target.querySelector('input'); | ||||
| 		ok(input); | ||||
| 
 | ||||
| 		input.value = 'goodbye'; | ||||
| 		input.dispatchEvent(new window.Event('input')); | ||||
| 
 | ||||
| 		flushSync(); | ||||
| 		assert.htmlEqual(target.innerHTML, `<input><p>goodbye</p>`); | ||||
| 	}, | ||||
| 
 | ||||
| 	warnings: [] | ||||
| }); | ||||
| @ -0,0 +1,6 @@ | ||||
| <script> | ||||
| 	let object = { value: 'hello' }; | ||||
| </script> | ||||
| 
 | ||||
| <input bind:value={object.value} /> | ||||
| <p>{object.value}</p> | ||||
					Loading…
					
					
				
		Reference in new issue