You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: documentation/docs/03-template-syntax/11-bind.md
+35-1Lines changed: 35 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -117,6 +117,31 @@ Since 5.6.0, if an `<input>` has a `defaultChecked` attribute and is part of a f
117
117
</form>
118
118
```
119
119
120
+
## `<input bind:indeterminate>`
121
+
122
+
Checkbox can be in [indeterminate](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/indeterminate) state, though it is still either checked or unchecked:
@@ -254,6 +280,10 @@ You can give the `<select>` a default value by adding a `selected` attribute to
254
280
</details>
255
281
```
256
282
283
+
## `window` and `document`
284
+
285
+
Binding to properties of `window` and `document` is done via the special elements [`<svelte:window>`](svelte-window) and [`<svelte:document>`](svelte-document). The available bindings are listed in their documentations.
286
+
257
287
## Contenteditable bindings
258
288
259
289
Elements with the `contenteditable` attribute support the following bindings:
@@ -278,14 +308,18 @@ All visible elements have the following readonly bindings, measured with a `Resi
> [!NOTE]`display: inline` elements do not have a width or height (except for elements with 'intrinsic' dimensions, like `<img>` and `<canvas>`), and cannot be observed with a `ResizeObserver`. You will need to change the `display` style of these elements to something else, such as `inline-block`.
322
+
> [!NOTE]`display: inline` elements do not have a width or height (except for elements with 'intrinsic' dimensions, like `<img>` and `<canvas>`), and cannot be observed with a `ResizeObserver`. You will need to change the `display` style of these elements to something else, such as `inline-block`. Also, CSS transformations do not trigger `ResizeObserver` as well.
0 commit comments