# globals

Class · category: Other

Source: https://github.com/playcanvas/editor-api/blob/4303c34bcee9a418297350899ad3a3f555526ec4/src/globals.ts#L16

Global variables

## Properties

### accessToken

```ts
static accessToken: string
```

The user's access token

### apiUrl

```ts
static apiUrl: string = ''
```

The REST API URL

### assets

```ts
static assets: Assets
```

The assets API

### branchId

```ts
static branchId: string
```

The current branch id

### clipboard

```ts
static clipboard: Clipboard
```

The main clipboard

### entities

```ts
static entities: Entities
```

The entities API

### hasLegacyScripts

```ts
static hasLegacyScripts: boolean
```

Whether this project is using legacy scripts

### history

```ts
static history: History
```

The history API

### homeUrl

```ts
static homeUrl: string = ''
```

The home URL

### jobs

```ts
static jobs: Jobs
```

The jobs API

### messenger

```ts
static messenger: Messenger
```

The messenger API

### projectId

```ts
static projectId: number
```

The current project id

### realtime

```ts
static realtime: Realtime
```

The realtime API

### schema

```ts
static schema: Schema
```

The schema API

### selection

```ts
static selection: Selection
```

The selection API

### settings

```ts
static settings: Settings
```

The settings API

## Methods

### confirmFn

```ts
static confirmFn(text: string, options?: object): Promise<boolean>
```

Alert function called when user confirmation is needed
for an action. Defaults to the default browser popup but
can be overridden to show your custom popup instead.

**Parameters**

- `text` (`string`): The confirm dialog text
- `options` (`object`, optional, default `{}`): Options for the popup
    - `options.noDismiss` (`boolean`, optional): If true then user cannot dismiss the popup and will have to click yes or no
    - `options.noText` (`boolean`, optional): Text for 'no' option
    - `options.yesText` (`string`, optional): Text for 'yes' option

**Returns** `Promise<boolean>`: True if the user confirmed, false otherwise
