---
name: "ctrlWebBrowserAction"
type: command
status: ok
groups: ["GUI Control"]
arma3_since: "2.20"
locality: {"argument": "local", "effect": "local", "server_exec": false}
source: https://community.bistudio.com/wiki/ctrlWebBrowserAction
revid: 379128
updated: 2026-10-09T13:10:17Z
---

# ctrlWebBrowserAction

*Command · GUI Control · Arma 3 v2.20*

Locality: arguments **local** · effect **local**

## Description

Executes an action on a WebBrowser control. The type of parameters depends on the action type. Possible Actions are:

| Action | Parameter | Result | Description |
|---|---|---|---|
| OpenDevConsole | None | [Nothing](../topics/Nothing.md) | Opens a Chrome Developer console for this browser, in a external window. (Only available if -debug start parameter is set) |
| ExecJS | [String](../topics/String.md) | [Nothing](../topics/Nothing.md) | Executes Javascript code inside the currently loaded page. |
| JSDialogResponse | [Boolean](../topics/Boolean.md) | [Nothing](../topics/Nothing.md) | Respond to a Javascript alert() or confirm(), after triggered by "JSDialog" Eventhandler |
| OpenDataAsURL | [String](../topics/String.md) | [Nothing](../topics/Nothing.md) | Displays provided data in browser. This can be used to load HTML from a file and display it in the Browser window. |
| LoadFile | [String](../topics/String.md) | [Nothing](../topics/Nothing.md) | Loads file into browser (Equivalent to ["OpenDataAsURL", loadFile "filePathHere"])<br>_ctrl ctrlWebBrowserAction ["LoadFile", "z\mod\file.html"] is equivalent to _ctrl [ctrlSetURL](../commands/ctrlSetURL.md) "file://z/mod/file.html" |
| ToBase64 | [String](../topics/String.md) | [String](../topics/String.md) | Encodes the input string into Base64 (This also works with [controlNull](../commands/controlNull.md)) |
| FromBase64 | [String](../topics/String.md) | [String](../topics/String.md) | Decodes the input Base64 string (This also works with [controlNull](../commands/controlNull.md)) |
| Deflate | [String](../topics/String.md) | [String](../topics/String.md) | Compresses the input and returns a Base64 Deflate compressed output with ZLib header (This also works with [controlNull](../commands/controlNull.md)) |
| Inflate | [String](../topics/String.md) | [String](../topics/String.md) | Takes Base64 encoded, Deflate compressed input data and returns the decompressed output (This also works with [controlNull](../commands/controlNull.md)). Output is limited to 1Megabyte. Equivalent Javascript code:<br>is https://gist.github.com/asidko/9c7064027039411a11323eaf7d8ea2a4#file-gzip-js-L12 but replace 'gzip' with 'deflate' |
| StopBrowser |  | [Nothing](../topics/Nothing.md) | Freezes the currently displayed image (the same image will keep being displayed). Closes the browser and free's all resources of it. This is useful if the Browser is only used to generate a static element and it doesn't need to keep updating it. It saves CPU and Memory resources. |
| ResumeBrowser |  | [Nothing](../topics/Nothing.md) | Unfreezes the browser, and loads the currently set URL (Either that was set before StopBrowser, or which has been set while the browser was paused). Note that when unfreezing, the browser may show one or two black frames while the page is loading. For seemless transition from Paused/Resumed state, you can use a ui2texture and not send any displayUpdate's to it until you consider the resumed browser to be ready. |
| SetBrowserInternalSize Arma 3 v2.24 | [Scalar](../topics/Number.md), [Scalar](../topics/Number.md) (width, height) | [Nothing](../topics/Nothing.md) | Sets the browsers internal render size. Any display will scale the texture up/down as needed. |
| SetControlReference Arma 3 v2.24 | [Control](../topics/Control.md) | [Nothing](../topics/Nothing.md) | Sets the control to be referenced by CT_CONTROL_REF control. |

## Syntax

```sqf
control ctrlWebBrowserAction [Action, ...]
```

**Parameters:**

- `control`: [Control](../topics/Control.md)
- `Action`: [String](../topics/String.md)

**Returns:** [Nothing](../topics/Nothing.md)

## Examples

### Example 1

```sqf
_control ctrlWebBrowserAction ["OpenDataAsURL", loadFile "example.html"];
```

## See also

[ctrlURL](../commands/ctrlURL.md) · [menuSetURL](../commands/menuSetURL.md)

<sub>Source: [BI Community Wiki — ctrlWebBrowserAction](https://community.bistudio.com/wiki/ctrlWebBrowserAction) (revision 379128).</sub>
