TyphonJS Runtime Library (FVTT) 0.3.0
  • #runtime/util/dom/layout
  • getStackingContext

Function getStackingContext

  • getStackingContext(
        node: Element,
        activeWindow?: Window,
    ): StackingContext | undefined
  • Recursive function that finds the closest parent stacking context. See also https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context

    Original author: Kerry Liu / https://github.com/gwwar

    Parameters

    • node: Element
    • OptionalactiveWindow: Window

      The target active window as applicable.

    Returns StackingContext | undefined

    The closest parent stacking context or undefined if none.

    See

    • https://github.com/gwwar/z-context/blob/master/content-script.js
    • https://github.com/gwwar/z-context/blob/master/LICENSE

Settings

Member Visibility
Demo - Essential Svelte ESM
TyphonJS Runtime Library (FVTT) 0.3.0