Tan Li Hau
d16dd5d7ca
feat: add naturalWidth and naturalHeight bindings ( #7857 )
...
Closes #7771
---------
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
Co-authored-by: Simon Holthausen <simon.holthausen@vercel.com>
2 years ago
Tan Li Hau
53de73d08c
feat: simpler output for reactive vars if dependencies are all static ( #7942 )
2 years ago
Lioness100
5a3a1e488a
fix: correct typos in variable names ( #8257 )
...
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
2 years ago
Jay Harris
4f42daeff7
feat: `trusted-types` CSP compatibility for Web Components ( #8135 )
2 years ago
Yuichiro Yamashita
e1a1c7fa87
[chore] Fix CI ( #8160 )
...
* ci build
* fix test
* add test for #7938
2 years ago
Mathias Picker
c9e98e6bba
[fix]: remove double up initialization on svelte:element ( #8142 )
...
* fixed double up initialization on svelte:element elements
* updated test and fixed bug
* update other svelte:element test
* removed whitespace
* refactor
* correctly update expected ouput resulting from #7938
* remove .solo
Co-authored-by: Yuichiro Yamashita <xydybaseball@gmail.com>
2 years ago
Ramon Snir
f84c00edb9
[fix] static svelte:element not replaced with tag in production mode ( #7938 )
...
* [fix] static svelte:element not replaced with tag in production mode
* [fix] static svelte:element not replaced with tag in production mode
* add optimization of static <svelte:element> and fix a bug
Co-authored-by: Yuichiro Yamashita <xydybaseball@gmail.com>
2 years ago
Billy Levin
88ed9931f2
warn on assignment to const ( #4960 )
...
* warn on assignment to const
* fix formatting and switch to error
* check most local scopes first
* fix logic and add more tests
* more formatting
* Fix broken test
* use find_owner instead
Co-authored-by: tanhauhau <lhtan93@gmail.com>
3 years ago
Tan Li Hau
158ec43d99
[fix] do not warn about missing props for bindings ( #6583 )
3 years ago
Yuichiro Yamashita
433460ec2d
[feat] skip custom element check if <svelte:element> uses under svg ( #7869 )
...
* add test
* skip custom element check if svelte element uses under svg
3 years ago
Mathias Picker
6ec8ecf799
[fix] render of svg elements when using svelte:element ( #7695 )
...
* fixed render statement for svg when using svelte:element
* removed unecessary stuff in test
3 years ago
Yuichiro Yamashita
1803290864
[fix] Specify svg namespace if {@html} is used in svg ( #7464 )
...
* add test
* create svg element if {@html} tag is inside of svg
* always use claim_html_tag
3 years ago
Yuichiro Yamashita
e0d93254fd
[feature] Dynamic elements implementation <svelte:element> ( #6898 )
...
Closes #2324
Co-authored-by: Alfred Ringstad <alfred.ringstad@hyperlab.se>
Co-authored-by: Simon Holthausen <simon.holthausen@accso.de>
Co-authored-by: tanhauhau <lhtan93@gmail.com>
3 years ago
Tan Li Hau
b5aaa6641b
[feat] implement constants in markup ( #6413 )
3 years ago
Ignatius Bagus
2012124e87
[fix] foreign namespace hash link ( #7080 )
3 years ago
Bassam Ismail
c663104937
[fix] prevent cursor jump for all text inputs ( #6941 )
3 years ago
Vaibhav Rai
b6b7f5c8a4
[fix] properly respect sveltePath when rewriting user imports ( #6842 )
4 years ago
Conduitry
6735d5422c
[chore] fix js sample test
4 years ago
Yuichiro Yamashita
fc4797c6f8
[fix] only use optimized 'src' handling for 'html' namespace ( #6580 )
4 years ago
tomoam
907223cc78
[fix] only rely on `element`/`svg_element` functions if a hydrating component needs them ( #6556 )
4 years ago
Tan Li Hau
f25a995f7b
collapse whitespace in class and style attributes ( #6613 )
4 years ago
Tan Li Hau
c550f604f2
[feat] enable export ... from ( #6574 )
4 years ago
Tan Li Hau
ef14280e28
use simpler insert and append functions when not compiling with hydration ( #6525 )
4 years ago
Hofer Ivan
5cfefeb6e7
support rendering components in a shadow dom ( #5870 )
4 years ago
Hasan Altan Birler
ecbd96af95
[fix] hydration improvements ( #6449 )
4 years ago
Tan Li Hau
ebaa891e69
[chore] update code-red@0.2.0 ( #6425 )
...
Co-authored-by: Conduitry <git@chor.date>
4 years ago
Luis Confraria
554d5dd391
Fix preserveComments on ssr ( #4736 )
...
Fixes #4730
Co-authored-by: tanhauhau <lhtan93@gmail.com>
4 years ago
zerdox
0df9233fb1
Fix wrong "slot" property warning (runtime) ( #6065 )
...
* updated: condition for warning about unknown prop
* test are updated
4 years ago
Tan Li Hau
3f990a96ba
Use SSR rendered as initial html for runtime hydration test ( #4444 )
4 years ago
Pontus Lundin
d4f98fb63a
Call onMount when connected & clean up when disconnected for custom element ( #4522 )
...
* call onDestroy when disconnected
* lifecycle hooks and custom elements
- Call onMount in connectedCallback for customElements
- register onMount return values as on_disconnect-callbacks for customElements
- run on_disconnect callbacks in disconnectedCallback
* do not reset on_mount so that it can fire again if reinserted
* simpler isCustomElement & skip extra function call
- pass options.customElement down to mount_component
- remove expensive isCustomElement check
- only call add_render_callback if not customElement
Co-authored-by: Pontus Lundin <pontus.lundin@ica.se>
4 years ago
Tan Li Hau
6589aa2548
warn module variables are nonreactive and make them truly nonreactive ( #5847 )
4 years ago
J Delaney
4f05cc3e3c
don't create class update functions when dependencies aren't reactive ( #5926 )
4 years ago
Tan Li Hau
08cb3142e9
keep each block value ( #5841 )
4 years ago
Tan Li Hau
63669330f6
maintain context for keyed each ( #5840 )
4 years ago
Tan Li Hau
a41c7644e6
shift injected declarations to the top ( #5837 )
4 years ago
Tan Li Hau
1cc5bdb9ca
reactive dependency not referenced can't set to undefined initially ( #5600 )
4 years ago
Tan Li Hau
6fa3e91b5d
support $$props and $$restProps for custom elements ( #5608 )
5 years ago
Andreas Ehrencrona
ddf13211af
Updated to ESLint config 5.4.0 ( #5541 )
5 years ago
Ben McCann
229a16d6e7
upgrade ESLint config ( #5472 )
5 years ago
Ben McCann
0645631b28
Use TypeScript in tests ( #5433 )
5 years ago
Tan Li Hau
a1651ca271
add nonpassive event modifier ( #5442 )
...
Co-authored-by: filipot <filipot@stud.ntnu.no>
5 years ago
Tan Li Hau
aef5671411
update acorn and parse expression as module script ( #5423 )
5 years ago
Tan Li Hau
8a28d1bb38
valid XHTML syntax in innerHTML for static elements ( #5317 )
5 years ago
Antony Jones
82dc26a31c
Fix lint warnings ( #5263 )
5 years ago
Tan Li Hau
0ac341d2c6
expose which slots are present in $$slots ( #4602 )
5 years ago
Tan Li Hau
ec0f79c5af
add updating guard to binding callback ( #5126 )
5 years ago
Tan Li Hau
2450dd1ff0
update acorn@^7.3.1 for optional chaining support ( #5013 )
5 years ago
Tan Li Hau
55c809624d
fix collapsing HTML with static content ( #5059 )
5 years ago
Tan Li Hau
6289dfcdcd
fix <select> one-way bind when options change ( #5054 )
5 years ago
Tan Li Hau
7dfd9e9653
deconflict bind:this variable ( #4949 )
5 years ago