MCPcopy
hub / github.com/sveltejs/svelte / set

Function set

packages/svelte/src/internal/client/dom/elements/custom-element.js:313–328  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

311 return this.$$c && prop in this.$$c ? this.$$c[prop] : this.$$d[prop];
312 },
313 set(value) {
314 value = get_custom_element_value(prop, value, props_definition);
315 this.$$d[prop] = value;
316 var component = this.$$c;
317
318 if (component) {
319 // // If the instance has an accessor, use that instead
320 var setter = get_descriptor(component, prop)?.get;
321
322 if (setter) {
323 component[prop] = value;
324 } else {
325 component.$set({ [prop]: value });
326 }
327 }
328 }
329 });
330 });
331 exports.forEach((property) => {

Callers 15

reactive_importFunction · 0.90
hmrFunction · 0.90
bind_valueFunction · 0.50
bind_groupFunction · 0.50
bind_checkedFunction · 0.50
bind_filesFunction · 0.50
bind_select_valueFunction · 0.50
callbackFunction · 0.50
bind_bufferedFunction · 0.50
bind_seekableFunction · 0.50
bind_playedFunction · 0.50
bind_seekingFunction · 0.50

Calls 2

get_custom_element_valueFunction · 0.85
$setMethod · 0.80

Tested by

no test coverage detected