@ -42,25 +42,30 @@ Numeric input values are coerced; even though `input.value` is a string as far a
<inputtype="range"bind:value={num}/>
<inputtype="range"bind:value={num}/>
```
```
On `<input>` elements with `type="file"`, you can use `bind:files` to get the [`FileList` of selected files](https://developer.mozilla.org/en-US/docs/Web/API/FileList). It is readonly.
On `<input>` elements with `type="file"`, you can use `bind:files` to get the [`FileList` of selected files](https://developer.mozilla.org/en-US/docs/Web/API/FileList). When you want to update the files programmatically, you always need to use a `FileList` object.
```svelte
```svelte
<script>
let files = $state();
function clear() {
files = new FileList(); // null or undefined doesn't work
If you're using `bind:` directives together with `on:` directives, the order that they're defined in affects the value of the bound variable when the event handler is called.
If you're using `bind:` directives together with `on` event attributes, the binding will always fire before the event attribute.