pull/15961/head
Rich Harris 4 months ago
parent eaf9e5eee4
commit 86ad2a1ead

@ -201,29 +201,7 @@ export function RegularElement(node, context) {
const node_id = context.state.node; const node_id = context.state.node;
if (has_spread) { if (has_spread) {
const attributes_id = b.id(context.state.scope.generate('attributes'));
build_set_attributes(attributes, class_directives, style_directives, context, node, node_id); build_set_attributes(attributes, class_directives, style_directives, context, node, node_id);
// // If value binding exists, that one takes care of calling $.init_select
// if (node.name === 'select' && !bindings.has('value')) {
// context.state.init.push(
// b.stmt(b.call('$.init_select', node_id, b.thunk(b.member(attributes_id, 'value'))))
// );
// context.state.update.push(
// b.if(
// b.binary('in', b.literal('value'), attributes_id),
// b.block([
// // This ensures a one-way street to the DOM in case it's <select {value}>
// // and not <select bind:value>. We need it in addition to $.init_select
// // because the select value is not reflected as an attribute, so the
// // mutation observer wouldn't notice.
// b.stmt(b.call('$.select_option', node_id, b.member(attributes_id, 'value')))
// ])
// )
// );
// }
} else { } else {
/** If true, needs `__value` for inputs */ /** If true, needs `__value` for inputs */
const needs_special_value_handling = const needs_special_value_handling =

Loading…
Cancel
Save