mirror of https://github.com/sveltejs/svelte
29 lines
977 B
29 lines
977 B
<!-- This file is generated by scripts/process-messages/index.js. Do not edit! -->
|
|
|
|
### dynamic_void_element_content
|
|
|
|
```
|
|
`<svelte:element this="%tag%">` is a void element — it cannot have content
|
|
```
|
|
|
|
Elements such as `<input>` cannot have content, any children passed to these elements will be ignored.
|
|
|
|
### state_snapshot_uncloneable
|
|
|
|
```
|
|
Value cannot be cloned with `$state.snapshot` — the original value was returned
|
|
```
|
|
|
|
```
|
|
The following properties cannot be cloned with `$state.snapshot` — the return value contains the originals:
|
|
|
|
%properties%
|
|
```
|
|
|
|
`$state.snapshot` tries to clone the given value in order to return a reference that no longer changes. Certain objects may not be cloneable, in which case the original value is returned. In the following example, `property` is cloned, but `window` is not, because DOM elements are uncloneable:
|
|
|
|
```js
|
|
const object = $state({ property: 'this is cloneable', window })
|
|
const snapshot = $state.snapshot(object);
|
|
```
|