diff --git a/src/pages/scripting/javascript-reference.mdx b/src/pages/scripting/javascript-reference.mdx index 29bf798..090476d 100644 --- a/src/pages/scripting/javascript-reference.mdx +++ b/src/pages/scripting/javascript-reference.mdx @@ -100,6 +100,27 @@ Set the maximum number of redirects to follow req.setMaxRedirects(5); ``` +### `getExecutionMode` +Get the current active execution mode + +Returns `runner` or `standalone` + +**Example** +```javascript +const mode = req.getExecutionMode(); +``` + +### `getExecutionPlatform` +Get the plattform the request is running on + +Returns `app` or `cli` + +**Example** +```javascript +const mode = req.getExecutionPlatform(); +``` + + ## Response This `res` variable is available inside your scripting and testing context. @@ -276,4 +297,4 @@ You can also abort the run by explicitly setting the next request to `null` **Example:** ```javascript bru.setNextRequest(null); // aborts the run gracefully -``` \ No newline at end of file +```