-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3e9b6d0
commit d00f43a
Showing
29 changed files
with
321 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@adobe/uix-core](./uix-core.md) > [connectIframe](./uix-core.connectiframe.md) | ||
|
||
## connectIframe() function | ||
|
||
> This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. | ||
> | ||
Create a CrossRealmObject simulating objects from the provided iframe runtime. | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
export declare function connectIframe<Expected>(frame: HTMLIFrameElement, tunnelOptions: Partial<TunnelConfig>, apiToSend: unknown): Promise<CrossRealmObject<Expected>>; | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| frame | HTMLIFrameElement | | | ||
| tunnelOptions | Partial<[TunnelConfig](./uix-core.tunnelconfig.md)<!-- -->> | | | ||
| apiToSend | unknown | | | ||
|
||
**Returns:** | ||
|
||
Promise<[CrossRealmObject](./uix-core.crossrealmobject.md)<!-- --><Expected>> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@adobe/uix-core](./uix-core.md) > [connectParentWindow](./uix-core.connectparentwindow.md) | ||
|
||
## connectParentWindow() function | ||
|
||
> This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. | ||
> | ||
Create a CrossRealmObject in an iframe, simulating objects from the parent window. | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
export declare function connectParentWindow<Expected>(tunnelOptions: Partial<TunnelConfig>, apiToSend: unknown): Promise<CrossRealmObject<Expected>>; | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| tunnelOptions | Partial<[TunnelConfig](./uix-core.tunnelconfig.md)<!-- -->> | | | ||
| apiToSend | unknown | | | ||
|
||
**Returns:** | ||
|
||
Promise<[CrossRealmObject](./uix-core.crossrealmobject.md)<!-- --><Expected>> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@adobe/uix-core](./uix-core.md) > [CrossRealmObject](./uix-core.crossrealmobject.md) | ||
|
||
## CrossRealmObject interface | ||
|
||
> This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. | ||
> | ||
Representation of an object on the other side of an iframe/window divide between JS runtimes. | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
export interface CrossRealmObject<ExpectedApi> | ||
``` | ||
|
||
## Remarks | ||
|
||
At first, xrobject simply returned the proxy to the remote object and did not expose any of the underlying event handling. However, there was no way for a consumer to handle the case where the remote iframe reloaded, which would invalidate all of the simulated objects. | ||
|
||
This new manager object exposes the [Tunnel](./uix-core.tunnel.md) object so that consumers can subscribe to the "api" event. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@adobe/uix-core](./uix-core.md) > [Tunnel](./uix-core.tunnel.md) > [(constructor)](./uix-core.tunnel._constructor_.md) | ||
|
||
## Tunnel.(constructor) | ||
|
||
> This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. | ||
> | ||
Constructs a new instance of the `Tunnel` class | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
constructor(config: TunnelConfig); | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| config | [TunnelConfig](./uix-core.tunnelconfig.md) | | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@adobe/uix-core](./uix-core.md) > [Tunnel](./uix-core.tunnel.md) > [config](./uix-core.tunnel.config.md) | ||
|
||
## Tunnel.config property | ||
|
||
> This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. | ||
> | ||
**Signature:** | ||
|
||
```typescript | ||
config: TunnelConfig; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@adobe/uix-core](./uix-core.md) > [Tunnel](./uix-core.tunnel.md) > [emitLocal](./uix-core.tunnel.emitlocal.md) | ||
|
||
## Tunnel.emitLocal property | ||
|
||
> This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. | ||
> | ||
**Signature:** | ||
|
||
```typescript | ||
emitLocal: (type: string | symbol, payload?: unknown) => any; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@adobe/uix-core](./uix-core.md) > [Tunnel](./uix-core.tunnel.md) > [isConnected](./uix-core.tunnel.isconnected.md) | ||
|
||
## Tunnel.isConnected property | ||
|
||
> This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. | ||
> | ||
**Signature:** | ||
|
||
```typescript | ||
isConnected: boolean; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@adobe/uix-core](./uix-core.md) > [Tunnel](./uix-core.tunnel.md) | ||
|
||
## Tunnel class | ||
|
||
> This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. | ||
> | ||
An EventEmitter across two documents. It emits events on the remote document and takes subscribers from the local document. | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
export declare class Tunnel extends EventEmitter | ||
``` | ||
**Extends:** EventEmitter | ||
## Constructors | ||
| Constructor | Modifiers | Description | | ||
| --- | --- | --- | | ||
| [(constructor)(config)](./uix-core.tunnel._constructor_.md) | | **_(ALPHA)_** Constructs a new instance of the <code>Tunnel</code> class | | ||
## Properties | ||
| Property | Modifiers | Type | Description | | ||
| --- | --- | --- | --- | | ||
| [config](./uix-core.tunnel.config.md) | | [TunnelConfig](./uix-core.tunnelconfig.md) | **_(ALPHA)_** | | ||
| [emitLocal](./uix-core.tunnel.emitlocal.md) | | (type: string \| symbol, payload?: unknown) => any | **_(ALPHA)_** | | ||
| [isConnected](./uix-core.tunnel.isconnected.md) | | boolean | **_(ALPHA)_** | | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@adobe/uix-core](./uix-core.md) > [TunnelConfig](./uix-core.tunnelconfig.md) > [logger](./uix-core.tunnelconfig.logger.md) | ||
|
||
## TunnelConfig.logger property | ||
|
||
> This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. | ||
> | ||
Logger instance to use for debugging tunnel connection. | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
logger: Console; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@adobe/uix-core](./uix-core.md) > [TunnelConfig](./uix-core.tunnelconfig.md) | ||
|
||
## TunnelConfig interface | ||
|
||
> This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. | ||
> | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
export interface TunnelConfig | ||
``` | ||
|
||
## Properties | ||
|
||
| Property | Modifiers | Type | Description | | ||
| --- | --- | --- | --- | | ||
| [logger](./uix-core.tunnelconfig.logger.md) | | Console | **_(ALPHA)_** Logger instance to use for debugging tunnel connection. | | ||
| [targetOrigin](./uix-core.tunnelconfig.targetorigin.md) | | string | **_(ALPHA)_** To ensure secure communication, target origin must be specified, so the tunnel can't connect to an unauthorized domain. Can be '\*' to disable origin checks, but this is discouraged! | | ||
| [timeout](./uix-core.tunnelconfig.timeout.md) | | number | **_(ALPHA)_** A Promise for a tunnel will reject if not connected within timeout (ms). | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@adobe/uix-core](./uix-core.md) > [TunnelConfig](./uix-core.tunnelconfig.md) > [targetOrigin](./uix-core.tunnelconfig.targetorigin.md) | ||
|
||
## TunnelConfig.targetOrigin property | ||
|
||
> This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. | ||
> | ||
To ensure secure communication, target origin must be specified, so the tunnel can't connect to an unauthorized domain. Can be '\*' to disable origin checks, but this is discouraged! | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
targetOrigin: string; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@adobe/uix-core](./uix-core.md) > [TunnelConfig](./uix-core.tunnelconfig.md) > [timeout](./uix-core.tunnelconfig.timeout.md) | ||
|
||
## TunnelConfig.timeout property | ||
|
||
> This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. | ||
> | ||
A Promise for a tunnel will reject if not connected within timeout (ms). | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
timeout: number; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.