Hierarchy

  • IFrameHelper

Constructors

Methods

  • Checks if the page is opened inside an IFrame

    Returns boolean

  • Updates the parent windows scroll position to show the IFrame at the top left.
    Can be adjusted by offsetX & offsetY.

    !!! Note !!!

    Only adjusts the scroll position of the window itself and therefore won't work if the IFrame is embedded inside another element with a scrollbar...

    Parameters

    • Optional offsetX: number
    • Optional offsetY: number

    Returns void

  • Send a custom message to the parent page via the "CustomMessage".
    The parent page can handle those messages by implementing the function Combeenation.on{msgName}.

    Parameters

    • msgName: string
    • Optional data: object

    Returns void

  • Changes the width and/or height of the IFrame and/or scroll position of the parent page window.
    Won't do anything if we are not inside an IFrame.
    Sends an "silent" error to raygun if we are inside an IFrame but the CbnPlugin is not correctly installed on the parent site.

    Parameters

    • Optional width: number

      If not given or 0, the width is not changed

    • Optional height: number

      If not given or 0, the height is not changed

    • Optional scrollToX: number

      New horizontal scroll position of the parent page window

    • Optional scrollToY: number

      New vertical scroll position of the parent page window

    Returns void

Generated using TypeDoc