@passes/reqs / Exports / Messaging
Namespace: Messaging
Table of contents
Interfaces
Functions
Functions
awaitRequest
▸ awaitRequest(): Promise
<RequestMessage
>
Topic and Pass Providers should call awaitRequest
when opened by a requesting app to receive the Pass Request. Under the hood, it sends a connect message to the requesting app window and returns a promise that resolves with the request when it's received.
Returns
Promise
<RequestMessage
>
Memberof
Messaging
Defined in
sendResult
▸ sendResult(result
, origin?
): void
Topic and Pass Providers should call sendResult
when they have a result to send back to the requesting app.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
result | Uint8Array | undefined | The encoded result to send back to the requesting app. |
origin? | string | '*' | The origin to send the result to. Defaults to '*'. |
Returns
void
Memberof
Messaging