MCPcopy
hub / github.com/livebud/bud / add_attributes

Method add_attributes

package/svelte/compiler.js:19757–19771  ·  view source on GitHub ↗
(block)

Source from the content-addressed store, hash-verified

19755 block.chunks.mount.push(binding_callback);
19756 }
19757 add_attributes(block) {
19758 this.attributes.forEach((attribute) => {
19759 if (attribute.node.name === "class") {
19760 const dependencies = attribute.node.get_dependencies();
19761 push_array$1(this.class_dependencies, dependencies);
19762 }
19763 });
19764 if (this.node.attributes.some((attr) => attr.is_spread)) {
19765 this.add_spread_attributes(block);
19766 return;
19767 }
19768 this.attributes.forEach((attribute) => {
19769 attribute.render(block);
19770 });
19771 }
19772 add_spread_attributes(block) {
19773 const levels = block.get_unique_name(`${this.var.name}_levels`);
19774 const data2 = block.get_unique_name(`${this.var.name}_data`);

Callers 1

render_elementMethod · 0.80

Calls 4

push_array$1Function · 0.85
get_dependenciesMethod · 0.80
add_spread_attributesMethod · 0.80
renderMethod · 0.45

Tested by

no test coverage detected