Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Microsoft Playwright TraceV7

From Leeroopedia

Template:Implementation Page

Overview

TraceV7 defines the type schema for version 7 of the Playwright trace file format, adding TypedArray support, error serialization, and expanded Size exports.

Description

Version 7 introduces significant additions to the serialized value format:

  • Binary type alias for Buffer
  • TypedArray serialization (ta) supporting Int8Array, Uint8Array, Float32Array, BigInt64Array, etc.
  • Error serialization (e) with message, name, and stack
  • Exported Size type for broader use

The trace event schema is also expanded to 260 lines, reflecting additional event types and metadata.

Usage

Used by the trace viewer for parsing V7 format trace files.

Code Reference

Source Location

packages/playwright-core/src/utils/isomorphic/trace/versions/traceV7.ts (260 lines)

Key Types

type Binary = Buffer;

type SerializedValue = {
  // ... V4 fields plus:
  ta?: {
    b: Binary;
    k: 'i8' | 'ui8' | 'ui8c' | 'i16' | 'ui16' | 'i32' | 'ui32' | 'f32' | 'f64' | 'bi64' | 'bui64';
  };
  e?: { m: string; n: string; s: string };  // Error
};

export type Size = { width: number; height: number };

Import

import type * as traceV7 from '../utils/isomorphic/trace/versions/traceV7';

I/O Contract

Changes from V6

  • Added TypedArray serialization for binary data
  • Added Error object serialization
  • Exported Size type

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment