mirror of https://github.com/sveltejs/svelte
fix: set `open` binding value in `<details>` (#10413)
* fix: set initial value for `open` binding in `<details>` * accurate descpull/10417/head
parent
76620e7d02
commit
89c4cf393f
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: set `open` binding value in `<details>`
|
@ -0,0 +1,11 @@
|
||||
import { ok, test } from '../../test';
|
||||
|
||||
export default test({
|
||||
test({ assert, target }) {
|
||||
const details_el = target.querySelector('details');
|
||||
|
||||
ok(details_el);
|
||||
|
||||
assert.strictEqual(details_el.open, true);
|
||||
}
|
||||
});
|
@ -0,0 +1,8 @@
|
||||
<script>
|
||||
let open = $state(true);
|
||||
</script>
|
||||
|
||||
<details bind:open>
|
||||
<summary>Details</summary>
|
||||
...
|
||||
</details>
|
Loading…
Reference in new issue