Skip to content

Commit

Permalink
update svelte
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Aug 8, 2018
1 parent c862225 commit a55802b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
8 changes: 1 addition & 7 deletions libraries/svelte/meta/issues.json
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
[
{
"link": "https://github.com/sveltejs/svelte/issues/875",
"title": "Passing data to custom elements",
"meta": "#875 opened on September 27 by Rich-Harris"
}
]
[]
7 changes: 3 additions & 4 deletions libraries/svelte/meta/summary.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<h4 id="svelte-handling-data">Handling data</h4>

Svelte passes all data to Custom Elements in the form of HTML attributes. For
primitive data this is fine, but the system breaks down when passing rich data,
like objects or arrays. In these instances you end up with stringified values
like <code>some-attr="[object Object]"</code> which can't actually be used.
Svelte uses a heuristic to determine whether to pass data as properties or
attributes — if the property is defined on the element instance, a property
is used, otherwise it will fall back to attributes.

<h4 id="svelte-handling-events">Handling events</h4>

Expand Down
5 changes: 5 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,8 @@
},
"devDependencies": {
"http-server": "0.11.1"
},
"dependencies": {
"svelte": "^2.9.11"
}
}

0 comments on commit a55802b

Please sign in to comment.