Skip to content

Latest commit

 

History

History
205 lines (110 loc) · 4.42 KB

WindowMessageTransport.md

File metadata and controls

205 lines (110 loc) · 4.42 KB

@ledgerhq/live-app-sdk / Exports / WindowMessageTransport

Class: WindowMessageTransport

Implements

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new WindowMessageTransport(target?, logger?)

Parameters

Name Type Default value
target Window window
logger default defaultLogger

Defined in

transports/windowMessageTransport.ts:14

Properties

_onMessage

Private Optional _onMessage: MessageHandler

Defined in

transports/windowMessageTransport.ts:12


logger

Private logger: default

Defined in

transports/windowMessageTransport.ts:10


target

Private target: Window

Defined in

transports/windowMessageTransport.ts:8

Accessors

onMessage

get onMessage(): undefined | MessageHandler

A function to handle new messages coming from the Ledger Live platform

Returns

undefined | MessageHandler

Implementation of

Transport.onMessage

Defined in

transports/windowMessageTransport.ts:79

set onMessage(handler): void

A function to handle new messages coming from the Ledger Live platform

Parameters

Name Type
handler undefined | MessageHandler

Returns

void

Implementation of

Transport.onMessage

Defined in

transports/windowMessageTransport.ts:75

Methods

_onMessageEvent

_onMessageEvent(event): void

Parameters

Name Type
event MessageEvent<any>

Returns

void

Defined in

transports/windowMessageTransport.ts:41


connect

connect(): void

Connect the transport instance

Returns

void

Implementation of

Transport.connect

Defined in

transports/windowMessageTransport.ts:19


disconnect

disconnect(): void

Disconnect the transport instance

Returns

void

Implementation of

Transport.disconnect

Defined in

transports/windowMessageTransport.ts:30


send

send(response): Promise<void>

A function to send new messages to the Ledger Live platform

Parameters

Name Type
response unknown

Returns

Promise<void>

Implementation of

Transport.send

Defined in

transports/windowMessageTransport.ts:83