0
0
mirror of https://github.com/sveltejs/svelte.git synced 2024-12-01 17:30:59 +01:00
svelte/test/js
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>
2021-02-15 22:40:17 +00:00
..
samples Call onMount when connected & clean up when disconnected for custom element (#4522) 2021-02-15 22:40:17 +00:00
index.ts upgrade ESLint config (#5472) 2020-09-29 20:19:43 -04:00
README.md
update.js upgrade ESLint config (#5472) 2020-09-29 20:19:43 -04:00

Use these tests sparingly, as they will need to be updated frequently as the code generation changes.