Home / Function/ toggleNotification() — astro Function Reference

toggleNotification() — astro Function Reference

Architecture documentation for the toggleNotification() function in helpers.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  88879728_c9af_6e16_b073_57c8a4eb7b04["toggleNotification()"]
  7719489a_66d6_a31e_2dbd_67d7bbb35c8a["ToolbarAppEventTarget"]
  88879728_c9af_6e16_b073_57c8a4eb7b04 -->|defined in| 7719489a_66d6_a31e_2dbd_67d7bbb35c8a
  style 88879728_c9af_6e16_b073_57c8a4eb7b04 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/runtime/client/dev-toolbar/helpers.ts lines 31–40

	toggleNotification(options: NotificationPayload) {
		this.dispatchEvent(
			new CustomEvent('toggle-notification', {
				detail: {
					state: options.state,
					level: options.state === true ? options.level : undefined,
				} satisfies NotificationPayload,
			}),
		);
	}

Domain

Subdomains

Frequently Asked Questions

What does toggleNotification() do?
toggleNotification() is a function in the astro codebase, defined in packages/astro/src/runtime/client/dev-toolbar/helpers.ts.
Where is toggleNotification() defined?
toggleNotification() is defined in packages/astro/src/runtime/client/dev-toolbar/helpers.ts at line 31.

Analyze Your Own Codebase

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

Try Supermodel Free