Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • IFrameHelper

Index

Constructors

constructor

Methods

Static inIFrame

  • inIFrame(): boolean

Static scrollCfgrIntoView

  • scrollCfgrIntoView(offsetX?: number, offsetY?: number): void
  • 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

Static sendCustomMsg

  • sendCustomMsg(msgName: string, data?: object): 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

Static setFrameSize

  • setFrameSize(width?: number, height?: number, scrollToX?: number, scrollToY?: number): 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