Options
All
  • Public
  • Public/Protected
  • All
Menu

@bloomreach/navapp-communication

Index

Functions

connectToChild

  • Method to connect to an application in an iframe window.

    Parameters

    • __namedParameters: object
      • iframe: HTMLIFrameElement

        The iframe element that should contain another instance of the navigation communication library looking to connect

      • methods: ParentApi

        The api the parent exposes to the child

      • timeout: number

        The time in ms after which an error will be thrown if the child has failed to connect

    Returns Promise<ChildPromisedApi>

connectToParent

  • Method to connect to a parent window.

    Parameters

    • __namedParameters: object
      • methods: ChildApi

        the api that the child app exposes to the parent

      • parentOrigin: string

        the origin should match the parent origin or a connection wont be allowed

    Returns Promise<ParentPromisedApi>

getTimeoutValue

  • getTimeoutValue(api: ChildApi): Promise<number>
  • Parameters

    Returns Promise<number>

wrapWithTimeout