Home / Function/ get_setters() — svelte Function Reference

get_setters() — svelte Function Reference

Architecture documentation for the get_setters() function in attributes.js from the svelte codebase.

Entity Profile

Dependency Diagram

graph TD
  1d3fa733_c8b9_7ca3_c600_2689a6e7c29d["get_setters()"]
  0acd2537_e1bf_d7ae_30d5_407378cfa4d3["attributes.js"]
  1d3fa733_c8b9_7ca3_c600_2689a6e7c29d -->|defined in| 0acd2537_e1bf_d7ae_30d5_407378cfa4d3
  a305388e_cd72_059e_c54e_36001ca30e0a["set_attribute()"]
  a305388e_cd72_059e_c54e_36001ca30e0a -->|calls| 1d3fa733_c8b9_7ca3_c600_2689a6e7c29d
  0c0569a6_0fe6_ad48_18b5_235d70e8fd1f["set_custom_element_data()"]
  0c0569a6_0fe6_ad48_18b5_235d70e8fd1f -->|calls| 1d3fa733_c8b9_7ca3_c600_2689a6e7c29d
  4c70ef10_16f1_40f4_1d51_8a7169bd1dba["set_attributes()"]
  4c70ef10_16f1_40f4_1d51_8a7169bd1dba -->|calls| 1d3fa733_c8b9_7ca3_c600_2689a6e7c29d
  a08b6cc5_af73_1be4_d02f_3113cf8a8305["get()"]
  1d3fa733_c8b9_7ca3_c600_2689a6e7c29d -->|calls| a08b6cc5_af73_1be4_d02f_3113cf8a8305
  style 1d3fa733_c8b9_7ca3_c600_2689a6e7c29d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/svelte/src/internal/client/dom/elements/attributes.js lines 576–601

function get_setters(element) {
	var cache_key = element.getAttribute('is') || element.nodeName;
	var setters = setters_cache.get(cache_key);
	if (setters) return setters;
	setters_cache.set(cache_key, (setters = []));

	var descriptors;
	var proto = element; // In the case of custom elements there might be setters on the instance
	var element_proto = Element.prototype;

	// Stop at Element, from there on there's only unnecessary setters we're not interested in
	// Do not use contructor.name here as that's unreliable in some browser environments
	while (element_proto !== proto) {
		descriptors = get_descriptors(proto);

		for (var key in descriptors) {
			if (descriptors[key].set) {
				setters.push(key);
			}
		}

		proto = get_prototype_of(proto);
	}

	return setters;
}

Domain

Subdomains

Calls

Frequently Asked Questions

What does get_setters() do?
get_setters() is a function in the svelte codebase, defined in packages/svelte/src/internal/client/dom/elements/attributes.js.
Where is get_setters() defined?
get_setters() is defined in packages/svelte/src/internal/client/dom/elements/attributes.js at line 576.
What does get_setters() call?
get_setters() calls 1 function(s): get.
What calls get_setters()?
get_setters() is called by 3 function(s): set_attribute, set_attributes, set_custom_element_data.

Analyze Your Own Codebase

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

Try Supermodel Free