# io.Connect Browser

**Kind**: module | **Library**: @interopio/browser

**Source**: https://docs.interop.io/browser/reference/javascript/io.connect browser/index.html

io.Connect Browser allows web apps to integrate with other apps that are part of the same io.Connect Browser project via a set of APIs.
io.Connect Browser enables you to share data between apps, expose functionality, manage windows, notifications, and more.

## Referencing

The [`@interopio/browser`](https://www.npmjs.com/package/@interopio/browser) library is available both as a single JavaScript file,
which you can include in your web apps using a `<script>` tag, and also as a module, which you can import in your apps:

```html
<script type="text/javascript" src="browser.umd.js"></script>
```

Or:

``` javascript
import IOBrowser from "@interopio/browser";
```

## Initialization

The [`@interopio/browser`](https://www.npmjs.com/package/@interopio/browser) library attaches the `IOBrowser()` factory function
to the global `window` object. Invoke this function to initialize the library and connect to the io.Connect Browser environment.
The `IOBrowser()` factory function accepts an optional `Config` object as an argument, which you can use to provide settings for the library
(e.g., initialize additional io.Connect libraries, configure the library behavior or some of its APIs).
The factory function resolves with the initialized io.Connect API object, which you can use to access all available io.Connect APIs:

```javascript
import IOBrowser from "@interopio/browser";
import IOWorkspaces from "@interopio/workspaces-api";

const initializeIOConnect = async () => {

// Initializing the Workspaces API.
const initOptions = {
libraries: [IOWorkspaces]
};

// Use the initialized API object to access the io.Connect APIs.
const io = await IOBrowser(initOptions);

// Here, the library is already initialized and you can access all available io.Connect APIs.
const myWorkspace = await io.workspaces.restoreWorkspace("My Workspace");
};

initializeIOConnect().catch(console.error);
```

## Interfaces

- [API](https://docs.interop.io/browser/reference/javascript/io.connect%20browser/api/index.md): Describes an instance of the initialized io.Connect library.
- [Config](https://docs.interop.io/browser/reference/javascript/io.connect%20browser/config/index.md): Describes the configuration for the `IOBrowser()` factory function.
- [IntentResolverUIConfig](https://docs.interop.io/browser/reference/javascript/io.connect%20browser/intentresolveruiconfig/index.md): Settings for the Intents Resolver UI.
- [ModalsUIConfig](https://docs.interop.io/browser/reference/javascript/io.connect%20browser/modalsuiconfig/index.md): The [`@interopio/modals-ui`](https://www.npmjs.com/package/@interopio/modals-ui) library provides components and APIs used
- [SystemLogger](https://docs.interop.io/browser/reference/javascript/io.connect%20browser/systemlogger/index.md): Settings for the system logger used by the library.
- [WidgetChannels](https://docs.interop.io/browser/reference/javascript/io.connect%20browser/widgetchannels/index.md): Settings for the Channel Selector UI.
- [WidgetChannelSelectorConfig](https://docs.interop.io/browser/reference/javascript/io.connect%20browser/widgetchannelselectorconfig/index.md): Settings for the Widget Channel Selector UI.
- [WidgetConfig](https://docs.interop.io/browser/reference/javascript/io.connect%20browser/widgetconfig/index.md): Describes the configuration for the io.Connect widget.

## Type Aliases

- [IOConnectBrowserFactoryFunction](https://docs.interop.io/browser/reference/javascript/io.connect%20browser/ioconnectbrowserfactoryfunction/index.md): Factory function that creates a new ioconnect instance.
- [WidgetChannelsDisplayMode](https://docs.interop.io/browser/reference/javascript/io.connect%20browser/widgetchannelsdisplaymode/index.md): Determines which of the available Channels to display (all or only FDC3 ones).
- [WidgetChannelSelectorType](https://docs.interop.io/browser/reference/javascript/io.connect%20browser/widgetchannelselectortype/index.md): Type of the Channel Selector to use in the widget.
- [WidgetPosition](https://docs.interop.io/browser/reference/javascript/io.connect%20browser/widgetposition/index.md): Initial position for the widget within the window.
