Skip to content

Commit 9d6ab67

Browse files
Update index.md
1 parent a28e194 commit 9d6ab67

File tree

1 file changed

+4
-0
lines changed
  • apps/svelte.dev/content/tutorial/02-advanced-svelte/04-advanced-bindings/04-dimensions

1 file changed

+4
-0
lines changed

apps/svelte.dev/content/tutorial/02-advanced-svelte/04-advanced-bindings/04-dimensions/index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,7 @@ You can add `clientWidth`, `clientHeight`, `offsetWidth` and `offsetHeight` bind
1313
```
1414

1515
These bindings are readonly — changing the values of `w` and `h` won't have any effect on the element.
16+
17+
> [!NOTE] Elements are measured using a technique similar to [this one](http://www.backalleycoder.com/2013/03/18/cross-browser-event-based-element-resize-detection/). There is some overhead involved, so it's not recommended to use this for large numbers of elements.
18+
>
19+
> `display: inline` elements cannot be measured with this approach; nor can elements that can't contain other elements (such as `<canvas>`). In these cases you will need to measure a wrapper element instead.

0 commit comments

Comments
 (0)