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 )
4 years ago
Andreas Ehrencrona
ddf13211af
Updated to ESLint config 5.4.0 ( #5541 )
4 years ago
Ben McCann
229a16d6e7
upgrade ESLint config ( #5472 )
4 years ago
Ben McCann
0645631b28
Use TypeScript in tests ( #5433 )
4 years ago
Tan Li Hau
a1651ca271
add nonpassive event modifier ( #5442 )
...
Co-authored-by: filipot <filipot@stud.ntnu.no>
4 years ago
Tan Li Hau
aef5671411
update acorn and parse expression as module script ( #5423 )
4 years ago
Tan Li Hau
8a28d1bb38
valid XHTML syntax in innerHTML for static elements ( #5317 )
4 years ago
Antony Jones
82dc26a31c
Fix lint warnings ( #5263 )
4 years ago
Tan Li Hau
0ac341d2c6
expose which slots are present in $$slots ( #4602 )
4 years ago
Tan Li Hau
ec0f79c5af
add updating guard to binding callback ( #5126 )
4 years ago
Tan Li Hau
2450dd1ff0
update acorn@^7.3.1 for optional chaining support ( #5013 )
4 years ago
Tan Li Hau
55c809624d
fix collapsing HTML with static content ( #5059 )
4 years ago
Tan Li Hau
6289dfcdcd
fix <select> one-way bind when options change ( #5054 )
4 years ago
Tan Li Hau
7dfd9e9653
deconflict bind:this variable ( #4949 )
4 years ago
Tan Li Hau
c21a42edbf
remove unreferenced variable from initial context ( #4941 )
4 years ago
Tan Li Hau
bf6c74fb17
fix binding for each block local variable ( #4861 )
4 years ago
pushkin
0da70f46b9
handle line ending differences in tests ( #4915 )
4 years ago
Rich Harris
b0377cc4e4
fix `{@html}` assuming it lives inside a <div> ( #4863 )
4 years ago
Rich Harris
3330c3fbab
only add event listeners when a block is first mounted ( #4860 )
4 years ago
Tan Li Hau
24ef4e1181
set select multiple value with spread ( #4894 )
4 years ago
Robert Hall
7fe1384f43
Property "muted" for <audio> and <video> ( #4690 )
...
* Audio two-way `muted` bind property
Loosely based on a37ee81676
?w=1
* Documentation
* fix test
* dont bother coercing muted, it happens automatically
Co-authored-by: Richard Harris <richard.a.harris@gmail.com>
4 years ago
pushkin
8d8db4e836
ensure if_block dependency is dirty to cancel outro ( #4634 )
4 years ago
Maurício Kishi
ff5f25249e
support dimension bindings in cross-origin mode ( #2989 )
4 years ago
Tan Li Hau
b4b57c39a2
clean up event handlers on re-mount ( #4493 )
5 years ago
Conduitry
f2ee7efb94
add dev runtime warning for unknown slot names ( #4501 )
5 years ago
pushkin
b6aaa44880
check for unknown props even if component doesn't have writable props ( #4454 )
5 years ago
rixo
0786d2858d
exclude global variables from $capture_state ( #4475 )
5 years ago
rixo
cb64fb2ac9
make $capture_state/$inject_state act on entire state ( #3822 )
...
Previously, these methods only applied to exported props.
Also, add $$inject option to constructor, which injects state before
running the update loop.
5 years ago
swyx
3fbafe33c2
implement Dev mode validation of {#each} block argument ( #4419 )
5 years ago
Tan Li Hau
6250046c05
perform dirty check before updating keyed each blocks ( #4413 )
5 years ago
Conduitry
f12340acf0
preserve js comments where possible ( #4293 )
5 years ago
Conduitry
2f81365e44
fix awaited expressions that need parentheses ( #4283 )
5 years ago
Tan Li Hau
a422d2aba5
fix actions having no access to parent nodes ( #4252 )
5 years ago
Tan Li Hau
7fb35dd0dc
fix safari input jumping
5 years ago
David Kondrad
8a596936d2
dynamic events: validate handler before executing ( #4105 )
5 years ago
Tan Li Hau
52dbc882a7
feat order attributes + actions too ( #4156 )
...
Co-authored-by: Conduitry <git@chor.date>
5 years ago
Tan Li Hau
c0dab9fefb
fix css specificity ( #4146 )
...
Co-authored-by: Almaz <gouffr@gmail.com>
5 years ago
Colin Casey
abe88f3b3a
FIX #2446 : apply bindings and event handlers in order
5 years ago
Tan Li Hau
a8b306f0a1
revert remove contextual overflow ( #4102 )
5 years ago
Tan Li Hau
f9a9484e39
fix dirtybit ( #4095 )
5 years ago
David Kondrad
6c0fb5be64
compiler: tag auto-subscribe stores as referenced in vars ( #4089 )
5 years ago
Rich Harris
6928284085
Merge pull request #4069 from mrkishi/invalidate
...
Remove instrumentation from main execution context
5 years ago
Tan Li Hau
2c9d864e33
fix: loop-guard scope leak
5 years ago