Lynx

WhiteBoard

This page documents the WhiteBoard CDP domain supported by Lynx DevTool.

Experimental reference

This generated reference is still being completed.

  • CDP events are not included yet.
  • Some Lynx extensions are listed but do not yet have detailed documentation.
  • Method descriptions are not automatically verified against the implementation and may be incomplete or inaccurate.

Verify behavior against the implementation and the linked upstream CDP reference before relying on it.

Overview

  • Scope: instance
  • CDP domain: Lynx-specific

Lynx Extensions

WhiteBoard.clear

Clears all global WhiteBoard shared-data entries.

  • Origin: lynx-extension
  • Source: devtool/lynx_devtool/agent/domain_agent/inspector_white_board_agent.cc
Parameters

No parameters.

Returns

No return fields.

Events
  • WhiteBoard.onSharedDataCleared
Notes
  • Requires WhiteBoard.enable first. If the delegate is disabled, the current handler returns without sending a CDP response.
  • Dispatches through LynxDevToolMediator to the TASM executor when available, otherwise to the JavaScript debugger.
  • If neither backend task runner is available, the mediator does not dispatch the request and no explicit CDP response is sent.
  • Returns an empty result object on success.
  • Returns a CDP error with code -32000 and message Failed to clear shared data! when the WhiteBoard instance is unavailable.
  • On success, enabled delegates receive WhiteBoard.onSharedDataCleared without params.
  • If no WhiteBoard inspector delegate is attached, the current handler does not send an explicit CDP response.
Examples

Clear shared data

Request:

{
  "id": 8,
  "method": "WhiteBoard.clear"
}

Response:

{
  "id": 8,
  "result": {}
}

Shared-data cleared notification

Response:

{
  "method": "WhiteBoard.onSharedDataCleared"
}

WhiteBoard.disable

Disables WhiteBoard shared-data inspection for the current target.

  • Origin: lynx-extension
  • Source: devtool/lynx_devtool/agent/domain_agent/inspector_white_board_agent.cc
Parameters

No parameters.

Returns

No return fields.

Notes
  • Dispatches through LynxDevToolMediator to the TASM executor when available, otherwise to the JavaScript debugger.
  • If neither backend task runner is available, the mediator does not dispatch the request and no explicit CDP response is sent.
  • Sets the WhiteBoard inspector delegate enabled flag to false.
  • Returns an empty result object.
  • After disable succeeds, WhiteBoard data methods that require an enabled delegate return no explicit CDP response.
  • If no WhiteBoard inspector delegate is attached, the current handler does not send an explicit CDP response.
Examples

Disable WhiteBoard inspection

Request:

{
  "id": 2,
  "method": "WhiteBoard.disable"
}

Response:

{
  "id": 2,
  "result": {}
}

WhiteBoard.enable

Enables WhiteBoard shared-data inspection for the current target.

  • Origin: lynx-extension
  • Source: devtool/lynx_devtool/agent/domain_agent/inspector_white_board_agent.cc
Parameters

No parameters.

Returns

No return fields.

Notes
  • Dispatches through LynxDevToolMediator to the TASM executor when available, otherwise to the JavaScript debugger.
  • If neither backend task runner is available, the mediator does not dispatch the request and no explicit CDP response is sent.
  • Sets the WhiteBoard inspector delegate enabled flag to true.
  • Returns an empty result object.
  • After enable succeeds, WhiteBoard shared-data change events can be delivered to this target.
  • If no WhiteBoard inspector delegate is attached, the current handler does not send an explicit CDP response.
Examples

Enable WhiteBoard inspection

Request:

{
  "id": 1,
  "method": "WhiteBoard.enable"
}

Response:

{
  "id": 1,
  "result": {}
}

WhiteBoard.getSharedData

Returns all global WhiteBoard shared-data entries.

  • Origin: lynx-extension
  • Source: devtool/lynx_devtool/agent/domain_agent/inspector_white_board_agent.cc
Parameters

No parameters.

Returns
NameTypeDescription
entriesarrayShared-data entries currently stored in the WhiteBoard.
entries[].keystringShared-data key.
entries[].valuestringJSON text for the shared-data value.
Notes
  • Requires WhiteBoard.enable first. If the delegate is disabled, the current handler returns without sending a CDP response.
  • Dispatches through LynxDevToolMediator to the TASM executor when available, otherwise to the JavaScript debugger.
  • If neither backend task runner is available, the mediator does not dispatch the request and no explicit CDP response is sent.
  • The native implementation does not read request params.
  • Values are returned as serialized JSON text strings.
  • Returns a CDP error with code -32000 and message Failed to get shared data! when the WhiteBoard instance is unavailable.
  • If no WhiteBoard inspector delegate is attached, the current handler does not send an explicit CDP response.
Examples

Get all shared data

Request:

{
  "id": 5,
  "method": "WhiteBoard.getSharedData"
}

Response:

{
  "id": 5,
  "result": {
    "entries": [
      {
        "key": "userName",
        "value": "\"Ada\""
      },
      {
        "key": "count",
        "value": "3"
      }
    ]
  }
}

WhiteBoard.removeSharedData

Removes one global WhiteBoard shared-data entry.

  • Origin: lynx-extension
  • Source: devtool/lynx_devtool/agent/domain_agent/inspector_white_board_agent.cc
Parameters
NameTypeRequiredDescription
keystringYesShared-data key to remove.
Returns

No return fields.

Events
  • WhiteBoard.onSharedDataRemoved
Notes
  • Requires WhiteBoard.enable first. If the delegate is disabled, the current handler returns without sending a CDP response.
  • Dispatches through LynxDevToolMediator to the TASM executor when available, otherwise to the JavaScript debugger.
  • If neither backend task runner is available, the mediator does not dispatch the request and no explicit CDP response is sent.
  • Returns an empty result object when the key exists and is removed.
  • Returns a CDP error with code -32602 and message The key does not exist! when the key is not present.
  • Returns a CDP error with code -32000 and message Failed to remove shared data! when the WhiteBoard instance is unavailable.
  • On success, enabled delegates receive WhiteBoard.onSharedDataRemoved with params.key.
  • If no WhiteBoard inspector delegate is attached, the current handler does not send an explicit CDP response.
Examples

Remove one shared-data entry

Request:

{
  "id": 6,
  "method": "WhiteBoard.removeSharedData",
  "params": {
    "key": "userName"
  }
}

Response:

{
  "id": 6,
  "result": {}
}

Shared-data removed notification

Response:

{
  "method": "WhiteBoard.onSharedDataRemoved",
  "params": {
    "key": "userName"
  }
}

Missing key

Request:

{
  "id": 7,
  "method": "WhiteBoard.removeSharedData",
  "params": {
    "key": "missing"
  }
}

Response:

{
  "id": 7,
  "error": {
    "code": -32602,
    "message": "The key does not exist!"
  }
}

WhiteBoard.setSharedData

Writes one global WhiteBoard shared-data entry.

  • Origin: lynx-extension
  • Source: devtool/lynx_devtool/agent/domain_agent/inspector_white_board_agent.cc
Parameters
NameTypeRequiredDescription
keystringYesShared-data key to create or update.
valuestringYesJSON text for the shared-data value.
Returns

No return fields.

Events
  • WhiteBoard.onSharedDataAdded
  • WhiteBoard.onSharedDataUpdated
Notes
  • Requires WhiteBoard.enable first. If the delegate is disabled, the current handler returns without sending a CDP response.
  • Dispatches through LynxDevToolMediator to the TASM executor when available, otherwise to the JavaScript debugger.
  • If neither backend task runner is available, the mediator does not dispatch the request and no explicit CDP response is sent.
  • The value param must be a string containing valid JSON text. For a string value, include the JSON string quotes inside the value text.
  • Returns an empty result object on success.
  • Returns a CDP error with code -32602 and message The value must be a valid JSON string! when value cannot be parsed as JSON.
  • Returns a CDP error with code -32000 and message Failed to set shared data! when the WhiteBoard instance is unavailable.
  • The shared-data store emits WhiteBoard.onSharedDataAdded for a new key and WhiteBoard.onSharedDataUpdated for an existing key.
  • The add event params contain key and value. The update event params contain key and newValue.
  • If no WhiteBoard inspector delegate is attached, the current handler does not send an explicit CDP response.
Examples

Set a string value

Request:

{
  "id": 3,
  "method": "WhiteBoard.setSharedData",
  "params": {
    "key": "userName",
    "value": "\"Ada\""
  }
}

Response:

{
  "id": 3,
  "result": {}
}

Shared-data added notification

Response:

{
  "method": "WhiteBoard.onSharedDataAdded",
  "params": {
    "key": "userName",
    "value": "\"Ada\""
  }
}

Invalid JSON value

Request:

{
  "id": 4,
  "method": "WhiteBoard.setSharedData",
  "params": {
    "key": "userName",
    "value": "Ada"
  }
}

Response:

{
  "id": 4,
  "error": {
    "code": -32602,
    "message": "The value must be a valid JSON string!"
  }
}
Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.