Home / Function/ bind_files() — svelte Function Reference

bind_files() — svelte Function Reference

Architecture documentation for the bind_files() function in input.js from the svelte codebase.

Entity Profile

Dependency Diagram

graph TD
  c1821138_7138_0a8c_b42b_7fbee45e91b9["bind_files()"]
  2254d980_5794_d0a4_3609_60f21d662ff4["input.js"]
  c1821138_7138_0a8c_b42b_7fbee45e91b9 -->|defined in| 2254d980_5794_d0a4_3609_60f21d662ff4
  140e2114_da40_4679_bc9f_599a89c67e4e["listen_to_event_and_reset_event()"]
  c1821138_7138_0a8c_b42b_7fbee45e91b9 -->|calls| 140e2114_da40_4679_bc9f_599a89c67e4e
  7494b934_a3b8_689e_91b6_8435e26461c5["render_effect()"]
  c1821138_7138_0a8c_b42b_7fbee45e91b9 -->|calls| 7494b934_a3b8_689e_91b6_8435e26461c5
  a08b6cc5_af73_1be4_d02f_3113cf8a8305["get()"]
  c1821138_7138_0a8c_b42b_7fbee45e91b9 -->|calls| a08b6cc5_af73_1be4_d02f_3113cf8a8305
  style c1821138_7138_0a8c_b42b_7fbee45e91b9 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/svelte/src/internal/client/dom/elements/bindings/input.js lines 295–312

export function bind_files(input, get, set = get) {
	listen_to_event_and_reset_event(input, 'change', () => {
		set(input.files);
	});

	if (
		// If we are hydrating and the value has since changed,
		// then use the updated value from the input instead.
		hydrating &&
		input.files
	) {
		set(input.files);
	}

	render_effect(() => {
		input.files = get();
	});
}

Domain

Subdomains

Frequently Asked Questions

What does bind_files() do?
bind_files() is a function in the svelte codebase, defined in packages/svelte/src/internal/client/dom/elements/bindings/input.js.
Where is bind_files() defined?
bind_files() is defined in packages/svelte/src/internal/client/dom/elements/bindings/input.js at line 295.
What does bind_files() call?
bind_files() calls 3 function(s): get, listen_to_event_and_reset_event, render_effect.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free