Skip to main content

BlockRegistry

Index

Constructors

constructor

Methods

add

checkBlocks

  • Runs all applicable block callbacks in parallel. Returns true if navigation is allowed (no block), false otherwise. Callbacks that throw or time out count as blocked (with dev-warn).


    Parameters

    Returns Promise<boolean>

collectApplicableBlocks

  • Collects all blocks applicable to a navigation targeting targetLayer.

    Rules:

    • local blocks: only those registered on targetLayer.
    • global blocks: those registered on targetLayer or any of its active-chain descendants (not inactive subtrees).

    Parameters

    Returns BlockEntry[]

remove

  • remove(layerId: string, entry: BlockEntry): void
  • Parameters

    • layerId: string
    • entry: BlockEntry

    Returns void

removeAllForLayer

  • removeAllForLayer(layerId: string): void
  • Remove all blocks registered for a layer (called on destroy).


    Parameters

    • layerId: string

    Returns void