Skip to main content
The Set Window Data command (Command Type: 17) sets a specified value at a given path within the browser’s window object.

Command Type

Command Type ID: 17

Parameters

ParameterTypeDescriptionRequired
pathArray of string or numberArray representing the path in the window object. Example: ["app", "state", "mode"] sets window.app.state.modeYes
timeoutnumberTimeout in millisecondsYes
valueanyThe value to assign at the specified pathNo

Usage Examples

Set a Simple Property

{
  "command": "set-window-data",
  "params": {
    "path": ["app", "config", "theme"],
    "timeout": 5000,
    "value": "dark"
  }
}

Set a Complex Object

{
  "command": "set-window-data",
  "params": {
    "path": ["store", "filters"],
    "timeout": 5000,
    "value": { "sport": "football", "live": true }
  }
}