For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt, and this page is available as Markdown at /next/api/cdp/api-ref/replay.md.
Lynx
  • English
  • Replay

    This page documents the Replay 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: global-and-instance
    • CDP domain: Lynx-specific

    Lynx Extensions

    Replay.end

    Ends TestBench replay by exposing a replay dump file as a stream.

    • Origin: lynx-extension
    • Source: devtool/lynx_devtool/agent/domain_agent/inspector_testbench_replay_agent.cc
    Parameters
    NameTypeRequiredDescription
    paramsstringYesFile path for the replay dump file. The native handler reads the whole params value as this string.
    Returns
    NameTypeDescription
    streamstringFileStream handle returned in the Replay.end message params on success.
    Events
    • Replay.end
    Notes
    • Replay support must be enabled in the current runtime. If ReplayController::Enable() is false, the agent returns method not implemented.
    • params is a raw string file path, not an object.
    • On success, LynxGlobalDevToolMediator opens the file with FileStream::Open() and sends a Replay.end message whose params.stream is the stream handle.
    • Read the returned stream handle with IO.read and close it with IO.close.
    • If the file path cannot be opened, the method returns a CDP error with message file path doesn't exist.
    • If ReplayController::Enable() becomes false inside the mediator task, the method returns a CDP error with message Replay doesn't enable.
    • In the internal replay workflow, ReplayController::EndTest() saves collected replay dump data to this file path before notifying DevTool through the same Replay.end message shape.
    Examples

    End replay and open the dump file

    Request:

    {
      "id": 2,
      "method": "Replay.end",
      "params": "/tmp/lynx-replay-dump.json"
    }

    Response:

    {
      "method": "Replay.end",
      "params": {
        "stream": "1"
      }
    }

    Replay.start

    Starts TestBench replay collection for the current Lynx page.

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

    No parameters.

    Returns

    No return fields.

    Notes
    • Replay support must be enabled in the current runtime. If ReplayController::Enable() is false, the agent returns method not implemented.
    • Dispatches through LynxGlobalDevToolMediator and starts ReplayController::StartTest() on the UI task runner.
    • Returns an empty result object on success.
    • Returns a CDP error with message Cannot find ui task runner when no UI task runner is available.
    Examples

    Start replay collection

    Request:

    {
      "id": 1,
      "method": "Replay.start"
    }

    Response:

    {
      "id": 1,
      "result": {}
    }
    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.