Skip to main content Link Search Menu Expand Document (external link)

RootElement overview

Contextual represenation of the root element of your application

Added in v8.19.0


Table of contents


context

RootElement

The root element of your application

Signature

export declare const RootElement: Context.Tagged<RootElement, RootElement>

Added in v8.19.0

models

RootElement (interface)

The root element of your application

Signature

export interface RootElement {
  readonly rootElement: ParentNode & HTMLElement
}

Added in v8.19.0

addRootElementListener

Add an event listener to the root of your application.

Signature

export declare const addRootElementListener: <EventName extends string, R = never>(
  options: AddEventListenerOptions<ParentNode & HTMLElement, EventName, R>
) => Effect.Effect<void, never, R | RootElement | Scope.Scope>

Added in v8.19.0