fixes#7948
- The assignment of the variable "previous_tag" was incorrectly positioned and could cause race condition when used with transitions.
- We need another variable to detect when we are in a transition to remove a node
---------
Co-authored-by: Yuichiro Yamashita <xydybaseball@gmail.com>
Closes#7771
---------
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
Co-authored-by: Simon Holthausen <simon.holthausen@vercel.com>
* 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>
* [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>
* 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>
* 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>