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
Docs: Updated the custom elements documentation to include $host (#16686)
* Updated the custom elements documentation to include
* moved the rune reference further up
* Small update to the sentence
* updated the formatting
* Update documentation/docs/07-misc/04-custom-elements.md
---------
Co-authored-by: Rich Harris <hello@rich-harris.dev>
Copy file name to clipboardExpand all lines: documentation/docs/07-misc/04-custom-elements.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ title: Custom elements
4
4
5
5
<!-- - [basically what we have today](https://svelte.dev/docs/custom-elements-api) -->
6
6
7
-
Svelte components can also be compiled to custom elements (aka web components) using the `customElement: true` compiler option. You should specify a tag name for the component using the `<svelte:options>`[element](svelte-options).
7
+
Svelte components can also be compiled to custom elements (aka web components) using the `customElement: true` compiler option. You should specify a tag name for the component using the `<svelte:options>`[element](svelte-options). Within the custom element you can access the host element via the [`$host`](https://svelte.dev/docs/svelte/$host) rune.
0 commit comments