pull/13560/head
Rich Harris 2 years ago
parent 0e4ae0af0e
commit 2dfe17439e

@ -112,7 +112,7 @@ If you export a `const`, `class` or `function`, it is readonly from outside the
</script>
```
Readonly props can be accessed as properties on the element, tied to the component using [`bind:this` syntax](component-directives#bind-this).
Readonly props can be accessed as properties on the element, tied to the component using [`bind:this` syntax](bindings#bind-this).
### Reactive variables

@ -122,7 +122,7 @@ All except `scrollX` and `scrollY` are readonly.
<svelte:document bind:prop={value} />
```
Similarly to `<svelte:window>`, this element allows you to add listeners to events on `document`, such as `visibilitychange`, which don't fire on `window`. It also lets you use [actions](element-directives#use-action) on `document`.
Similarly to `<svelte:window>`, this element allows you to add listeners to events on `document`, such as `visibilitychange`, which don't fire on `window`. It also lets you use [actions](actions) on `document`.
As with `<svelte:window>`, this element may only appear the top level of your component and must never be inside a block or element.
@ -145,7 +145,7 @@ All are readonly.
<svelte:body onevent={handler} />
```
Similarly to `<svelte:window>`, this element allows you to add listeners to events on `document.body`, such as `mouseenter` and `mouseleave`, which don't fire on `window`. It also lets you use [actions](element-directives#use-action) on the `<body>` element.
Similarly to `<svelte:window>`, this element allows you to add listeners to events on `document.body`, such as `mouseenter` and `mouseleave`, which don't fire on `window`. It also lets you use [actions](actions) on the `<body>` element.
As with `<svelte:window>` and `<svelte:document>`, this element may only appear the top level of your component and must never be inside a block or element.
@ -183,7 +183,7 @@ The `<svelte:options>` element provides a place to specify per-component compile
- `accessors={true}` — adds getters and setters for the component's props
- `accessors={false}` — the default
- `namespace="..."` — the namespace where this component will be used, most commonly "svg"; use the "foreign" namespace to opt out of case-insensitive attribute names and HTML-specific warnings
- `customElement={...}` — the [options](custom-elements-api#component-options) to use when compiling this component as a custom element. If a string is passed, it is used as the `tag` option
- `customElement={...}` — the [options](custom-elements#component-options) to use when compiling this component as a custom element. If a string is passed, it is used as the `tag` option
```svelte
<svelte:options customElement="my-custom-element" />

Loading…
Cancel
Save