ParentElement overview
Contextual represenation of the parentElement of an HTMLElement
Added in v8.19.0
Table of contents
actions
dispatchEvent
Dispatch an Event from the current ParentElement
Signature
export declare const dispatchEvent: <EventName extends keyof HTMLElementEventMap>(
event: EventName,
options?: EventInit
) => Effect.Effect<boolean, never, GlobalThis | ParentElement>
Added in v8.19.0
context
ParentElement
A Context for the parentElement of an HTMLElement
Signature
export declare const ParentElement: Context.Tagged<ParentElement, ParentElement>
Added in v8.19.0
getters
addParentElementListener
Add an event listener to the current ParentElement
Signature
export declare const addParentElementListener: <EventName extends string, R = never>(
options: EventTarget.AddEventListenerOptions<ParentNode & HTMLElement, EventName, R>
) => Effect.Effect<void, never, R | ParentElement | Scope.Scope>
Added in v8.19.0
querySelector
Query for an element using a CSS selector, relative to the current ParentElement
Signature
export declare const querySelector: <A extends HTMLElement>(
selector: string
) => Effect.Effect<Option.Option<A>, never, ParentElement>
Added in v8.19.0
querySelectorAll
Query for multiple elements using a CSS selector, relative to the current ParentElement
Signature
export declare const querySelectorAll: <A extends HTMLElement>(
selector: string
) => Effect.Effect<ReadonlyArray<A>, never, ParentElement>
Added in v8.19.0
models
ParentElement (interface)
A Context for the parentElement of an HTMLElement
Signature
export interface ParentElement {
readonly parentElement: ParentNode & HTMLElement
}
Added in v8.19.0