Skip to content

Latest commit

 

History

History
111 lines (68 loc) · 2.02 KB

IframeEventPoster.md

File metadata and controls

111 lines (68 loc) · 2.02 KB

@bigcommerce/checkout-sdk / IframeEventPoster

Class: IframeEventPoster<TEvent, TContext>

Type parameters

Name Type
TEvent TEvent
TContext undefined

Table of contents

Constructors

Methods

Constructors

constructor

new IframeEventPoster<TEvent, TContext>(targetOrigin, _targetWindow?, _context?)

Type parameters

Name Type
TEvent TEvent
TContext undefined

Parameters

Name Type
targetOrigin string
_targetWindow? Window
_context? TContext

Methods

post

post(event): void

Parameters

Name Type
event TEvent

Returns

void

post<TSuccessEvent, TErrorEvent>(event, options): Promise<TSuccessEvent>

Type parameters

Name Type
TSuccessEvent extends IframeEvent<string, any, TSuccessEvent>IframeEvent<string, any>
TErrorEvent extends IframeEvent<string, any, TErrorEvent>IframeEvent<string, any>

Parameters

Name Type
event TEvent
options IframeEventPostOptions<TSuccessEvent, TErrorEvent>

Returns

Promise<TSuccessEvent>


setContext

setContext(context): void

Parameters

Name Type
context TContext

Returns

void


setTarget

setTarget(window): void

Parameters

Name Type
window Window

Returns

void