Manual Reference Source Test
import IdentityWindow from 'src/modules/identity-window.js'
public class | source

IdentityWindow

Window pop-up handling

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public get

Method Summary

Public Methods
public

Close windowed iframe

public

Receive ping message and connect the 2 windows if necessary

public

init()

Initialize an event listener to listen to message from the pop-up

public

Check if pop-up window is open

public

Load iFrame styling on demand

public

onClose(fromWindow: Boolean): Function

Pop-up close callback

public

onMessage(event: Object)

Receive message from window

public

open(url: string, title: string, w: number, h: number)

Open windowed popup in the center of the screen

public

openIframe(url: string, isManageProfile: boolean)

Open windowed iframe in body of app

public

Send ping messages to host window to make sure windows stay connected

public

postMessage(message: Object)

Send messages to the pop-up

public

remove()

Remove the pop-up controller

public

setSource(source: *)

Set the source of the pop-up messages

public

setTarget(target: *)

Set the target of the pop-up messages

public

Subscribe to check if pop-up has closed

public

Initialize target window

Public Constructors

public constructor(props: Object) source

Params:

NameTypeAttributeDescription
props Object

Public Members

public get isInit: Boolean source

Public Methods

public closeIframe() source

Close windowed iframe

public handlePing() source

Receive ping message and connect the 2 windows if necessary

public init() source

Initialize an event listener to listen to message from the pop-up

public isPopUpClosed(): boolean source

Check if pop-up window is open

Return:

boolean

public loadIFrameStyling(): Promise source

Load iFrame styling on demand

Return:

Promise

public onClose(fromWindow: Boolean): Function source

Pop-up close callback

Params:

NameTypeAttributeDescription
fromWindow Boolean

Return:

Function

public onMessage(event: Object) source

Receive message from window

Params:

NameTypeAttributeDescription
event Object

public open(url: string, title: string, w: number, h: number) source

Open windowed popup in the center of the screen

Params:

NameTypeAttributeDescription
url string

window href

title string

window title

w number

window width

h number

window height

public openIframe(url: string, isManageProfile: boolean) source

Open windowed iframe in body of app

Params:

NameTypeAttributeDescription
url string

iframe source

isManageProfile boolean

apply manage profile style to modal

public pingPong() source

Send ping messages to host window to make sure windows stay connected

public postMessage(message: Object) source

Send messages to the pop-up

Params:

NameTypeAttributeDescription
message Object

public remove() source

Remove the pop-up controller

public setSource(source: *) source

Set the source of the pop-up messages

Params:

NameTypeAttributeDescription
source *

public setTarget(target: *) source

Set the target of the pop-up messages

Params:

NameTypeAttributeDescription
target *

public startPopUpTimer() source

Subscribe to check if pop-up has closed

public targetInit() source

Initialize target window