Skip to content

Commit 7812a70

Browse files
committed
revised
1 parent 7122eba commit 7812a70

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

packages/svelte/src/internal/client/dom/elements/bindings/input.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { DEV } from 'esm-env';
22
import { render_effect, teardown } from '../../../reactivity/effects.js';
3-
import { listen_to_event_and_reset_event, without_reactive_context } from './shared.js';
3+
import { listen_to_event_and_reset_event } from './shared.js';
44
import * as e from '../../../errors.js';
55
import { is } from '../../../proxy.js';
66
import { queue_micro_task } from '../../task.js';
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
import { test } from '../../test';
22

33
export default test({
4-
test({ target, assert, logs }) {
5-
const input = /** @type {HTMLInputElement} */ (target.querySelector('input'));
6-
input.value = 'everybody';
7-
input.dispatchEvent(new window.Event('input'));
8-
4+
test({ assert, logs }) {
95
assert.deepEqual(logs, [false]);
106
}
117
});

packages/svelte/tests/runtime-runes/samples/effect-tracking-binding-set/main.svelte

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@
1212
return bar;
1313
}
1414
}
15+
16+
let input;
17+
18+
$effect(() => {
19+
input.value = 'everybody';
20+
input.dispatchEvent(new window.Event('input'));
21+
})
1522
</script>
1623

17-
<input type="text" bind:value={foo.bar}>
24+
<input type="text" bind:value={foo.bar} bind:this={input}>

0 commit comments

Comments
 (0)