@bodil/dom
    Preparing search index...

    Namespace dom

    DOM manipulation tools.

    Classes

    DOMIterator

    An iterator for traversing siblings of a DOM node.

    HasSlotController

    A ReactiveController which tracks whether a slot is populated.

    Type Aliases

    ScrollAlign
    ScrollToItemOptions

    Functions

    activeElementPath

    As findActiveElement, but returns a list of the active elements as seen by each Document and ShadowRoot down to the actually active element.

    animateTo

    Animates an element using keyframes. Returns a promise that resolves after the animation completes or gets cancelled.

    animationEnd

    Wait for any animations running on the element to complete.

    animationFrame

    Call window.requestAnimationFrame with the provided callback and return a Disposable which will cancel the request when disposed.

    applyUniqueID

    Assign a unique ID to the target element.

    awaitFrame

    Return a promise which will resolve when the next animation frame happens.

    darkMode

    Get the user's dark mode preference.

    findActiveElement

    Dig through shadow roots to find the actual element that currently has focus. If nothing has focus in or below the given root, return undefined.

    findAncestor

    Find the first ancestor of the given child element matching the provided predicate function, walking up through shadow root boundaries.

    findDescendants

    Return all descendants of root which match the predicate function.

    findEventTarget

    Find the first EventTarget going up an Event.composedPath which matches the given predicate.

    intersectionObserver
    isAnimating

    Check if any animations are currently active on an element.

    isEditor

    Test whether an Element should be considered an editor, ie. something which expects to consume keydown events.

    isElement

    Given the name of a custom DOM element registered in Window.customElements, test whether an object is an instance of that element.

    mediaQuery

    Get a signal which reflects the current state of a media query.

    prefersReducedMotion

    Test whether the user has asked for reduced motion.

    resizeObserver
    scrollToItem

    Scroll an element into view.

    stopAnimations

    Stops all active animations on the target element. Returns a promise that resolves after all animations are cancelled.

    visibilityObserver