mirror of https://github.com/sveltejs/svelte
Convert src/compiler/compile/render_dom/wrappers/Element/handle_select_value_binding.ts to JavaScript
parent
920f6383c8
commit
5b196405d7
@ -1,16 +1,17 @@
|
|||||||
import AttributeWrapper from './Attribute';
|
/**
|
||||||
import BindingWrapper from './Binding';
|
* @param {import('./Attribute.js').default | import('./Binding.js').default} attr
|
||||||
import ElementWrapper from './index';
|
* @param {Set<string>} dependencies
|
||||||
|
*/
|
||||||
export default function handle_select_value_binding(
|
export default function handle_select_value_binding(attr, dependencies) {
|
||||||
attr: AttributeWrapper | BindingWrapper,
|
const { parent } = attr;
|
||||||
dependencies: Set<string>
|
if (parent.node.name === 'select') {
|
||||||
) {
|
( /** @type {import('./index.js').default} */(parent)).select_binding_dependencies = dependencies;
|
||||||
const { parent } = attr;
|
dependencies.forEach((prop) => {
|
||||||
if (parent.node.name === 'select') {
|
parent.renderer.component.indirect_dependencies.set(prop, new Set());
|
||||||
(parent as ElementWrapper).select_binding_dependencies = dependencies;
|
});
|
||||||
dependencies.forEach((prop: string) => {
|
}
|
||||||
parent.renderer.component.indirect_dependencies.set(prop, new Set());
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in new issue