pull/15961/head
Rich Harris 4 months ago
parent e6b99c6e0a
commit 674b175eb5

@ -17,7 +17,7 @@ import { build_getter } from '../utils.js';
import {
get_attribute_name,
build_attribute_value,
build_set_attributes,
build_attribute_effect,
build_set_class,
build_set_style
} from './shared/element.js';
@ -201,7 +201,7 @@ export function RegularElement(node, context) {
const node_id = context.state.node;
if (has_spread) {
build_set_attributes(attributes, class_directives, style_directives, context, node, node_id);
build_attribute_effect(attributes, class_directives, style_directives, context, node, node_id);
} else {
/** If true, needs `__value` for inputs */
const needs_special_value_handling =

@ -5,7 +5,11 @@ import { dev, locator } from '../../../../state.js';
import { is_text_attribute } from '../../../../utils/ast.js';
import * as b from '#compiler/builders';
import { determine_namespace_for_children } from '../../utils.js';
import { build_attribute_value, build_set_attributes, build_set_class } from './shared/element.js';
import {
build_attribute_value,
build_attribute_effect,
build_set_class
} from './shared/element.js';
import { build_render_statement } from './shared/utils.js';
/**
@ -82,7 +86,7 @@ export function SvelteElement(node, context) {
} else if (attributes.length) {
// Always use spread because we don't know whether the element is a custom element or not,
// therefore we need to do the "how to set an attribute" logic at runtime.
build_set_attributes(
build_attribute_effect(
attributes,
class_directives,
style_directives,

@ -17,7 +17,7 @@ import { build_template_chunk, get_expression_id } from './utils.js';
* @param {AST.RegularElement | AST.SvelteElement} element
* @param {Identifier} element_id
*/
export function build_set_attributes(
export function build_attribute_effect(
attributes,
class_directives,
style_directives,

Loading…
Cancel
Save