> ## Documentation Index
> Fetch the complete documentation index at: https://docs.simular.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# App

# Class: App

Defined in: [index.d.ts:190](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L190)

Represents an application that can be opened.

## Constructors

### Constructor

> **new App**(): `App`

#### Returns

`App`

## Accessors

### canonicalName

#### Get Signature

> **get** **canonicalName**(): `string` | `null`

Defined in: [index.d.ts:194](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L194)

Returns the canonical app name used for fuzzy matching.

##### Returns

`string` | `null`

***

### launchTarget

#### Get Signature

> **get** **launchTarget**(): `string` | `null`

Defined in: [index.d.ts:196](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L196)

Returns the launch target used to open the app (name or path).

##### Returns

`string` | `null`

## Methods

### open()

> **open**(`url`, `focusPolicy`, `visibility`, `waitForLoadComplete`): [`Instance`](Instance.mdx)

Defined in: [index.d.ts:217](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L217)

Opens or switches to an application. If a URL is provided, the URL is
opened with the specified app.

`focus_policy` controls whether the app is allowed to become
active/frontmost. Some applications (e.g. Chrome, Notes) ignore this
request and steal focus regardless.

`visibility` controls whether the app is launched hidden or shown.
Some applications (e.g. Chrome and other Chromium/Electron apps) ignore
the hidden flag and launch visibly, potentially stealing focus. In that
case the app is hidden explicitly after launch.

When `wait_for_load_complete` is true, this blocks for a short, fixed
delay to allow the app or URL to become responsive before returning.

#### Parameters

##### url

`string` | `null` | `undefined`

##### focusPolicy

[`FocusPolicy`](../enumerations/FocusPolicy.mdx)

##### visibility

[`Visibility`](../enumerations/Visibility.mdx)

##### waitForLoadComplete

`boolean`

#### Returns

[`Instance`](Instance.mdx)

***

### defaultBrowser()

> `static` **defaultBrowser**(): `App`

Defined in: [index.d.ts:198](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L198)

Returns a handle to the system's default browser.

#### Returns

`App`

***

### exactName()

> `static` **exactName**(`name`): `App`

Defined in: [index.d.ts:192](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L192)

Get the app by exact name. No fuzzy search is performed.

#### Parameters

##### name

`string`

#### Returns

`App`

***

### exists()

> `static` **exists**(`app`): `boolean`

Defined in: [index.d.ts:200](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L200)

Checks if the app exists.

#### Parameters

##### app

`string`

#### Returns

`boolean`
