Home / Function/ disconnectedCallback() — astro Function Reference

disconnectedCallback() — astro Function Reference

Architecture documentation for the disconnectedCallback() function in astro-island.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  07b3e55f_7bba_e409_58e2_3073b929ad81["disconnectedCallback()"]
  02e19bde_95de_08cd_0c93_61e01849e86b["AstroIsland"]
  07b3e55f_7bba_e409_58e2_3073b929ad81 -->|defined in| 02e19bde_95de_08cd_0c93_61e01849e86b
  style 07b3e55f_7bba_e409_58e2_3073b929ad81 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/runtime/server/astro-island.ts lines 54–57

		disconnectedCallback() {
			document.removeEventListener('astro:after-swap', this.unmount);
			document.addEventListener('astro:after-swap', this.unmount, { once: true });
		}

Domain

Subdomains

Frequently Asked Questions

What does disconnectedCallback() do?
disconnectedCallback() is a function in the astro codebase, defined in packages/astro/src/runtime/server/astro-island.ts.
Where is disconnectedCallback() defined?
disconnectedCallback() is defined in packages/astro/src/runtime/server/astro-island.ts at line 54.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free