{"name":"ctrlWebBrowserAction","operator":null,"title":"ctrlWebBrowserAction","type":"command","url":"https://community.bistudio.com/wiki/ctrlWebBrowserAction","revid":379128,"updated":"2026-10-09T13:10:17Z","groups":["GUI Control"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"2.20"}],"since":{"game":"arma3","name":"Arma 3","version":"2.20"},"arma3_since":"2.20","branch":null,"locality":{"argument":"local","effect":"local","server_exec":false},"exec":null,"description":"Executes an action on a WebBrowser control. The type of parameters depends on the action type. Possible Actions are:\n\n| Action | Parameter | Result | Description |\n|---|---|---|---|\n| OpenDevConsole | None | Nothing | Opens a Chrome Developer console for this browser, in a external window. (Only available if -debug start parameter is set) |\n| ExecJS | String | Nothing | Executes Javascript code inside the currently loaded page. |\n| JSDialogResponse | Boolean | Nothing | Respond to a Javascript alert() or confirm(), after triggered by \"JSDialog\" Eventhandler |\n| OpenDataAsURL | String | Nothing | Displays provided data in browser. This can be used to load HTML from a file and display it in the Browser window. |\n| LoadFile | String | Nothing | Loads file into browser (Equivalent to [\"OpenDataAsURL\", loadFile \"filePathHere\"])<br>_ctrl ctrlWebBrowserAction [\"LoadFile\", \"z\\mod\\file.html\"] is equivalent to _ctrl ctrlSetURL \"file://z/mod/file.html\" |\n| ToBase64 | String | String | Encodes the input string into Base64 (This also works with controlNull) |\n| FromBase64 | String | String | Decodes the input Base64 string (This also works with controlNull) |\n| Deflate | String | String | Compresses the input and returns a Base64 Deflate compressed output with ZLib header (This also works with controlNull) |\n| Inflate | String | String | Takes Base64 encoded, Deflate compressed input data and returns the decompressed output (This also works with controlNull). 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' |\n| StopBrowser |  | Nothing | 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. |\n| ResumeBrowser |  | Nothing | 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. |\n| SetBrowserInternalSize Arma 3 v2.24 | Scalar, Scalar (width, height) | Nothing | Sets the browsers internal render size. Any display will scale the texture up/down as needed. |\n| SetControlReference Arma 3 v2.24 | Control | Nothing | Sets the control to be referenced by CT_CONTROL_REF control. |","syntaxes":[{"syntax":"control ctrlWebBrowserAction [Action, ...]","since":null,"effect":null,"exec":null,"params":[{"name":"control","type":"Control","optional":false,"default":null,"description":null,"types":["Control"],"since":null,"text":"control: Control"},{"name":"Action","type":"String","optional":false,"default":null,"description":null,"types":["String"],"since":null,"text":"Action: String"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"control","types":["Control"]},"right":{"text":"[Action, ...]","types":["Array"]}}],"examples":[{"text":"```sqf\n_control ctrlWebBrowserAction [\"OpenDataAsURL\", loadFile \"example.html\"];\n```","code":["_control ctrlWebBrowserAction [\"OpenDataAsURL\", loadFile \"example.html\"];"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["ctrlURL","menuSetURL"],"notes":[],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: GUI Control","Introduced with Arma 3 version 2.20","Scripting Commands","Scripting Commands: Local Effect"]}