Skip to content
ConsoleMonster
Class

BrowserHost

ConsoleMonster.Headless

Namespace
ConsoleMonster.Headless
Assembly
ConsoleMonster
Implements
IDisposable
Modifiers
sealed

Shows a HeadlessTerminal in a web page and sends the page's keys and clicks back, for docs, demos and visual tests. The page is self-contained (no external scripts, styles or fonts) and updates as the screen changes. The server listens on 127.0.0.1 only and every request must carry the per-run token from BrowserHost.Address; requests for another host name (DNS rebinding) or posted from another origin are refused.

Inheritance

  • object
  • BrowserHost

Usage

Explore 1 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Returned or exposed by 1

Methods

public void Dispose() #

Stops serving and closes open pages' connections.

public static BrowserHost Start(HeadlessTerminal terminal, BrowserHostOptions? options = null) #

Starts serving a headless terminal.

Parameters

terminal ConsoleMonster.Headless.HeadlessTerminal required
The terminal to show and drive.
options ConsoleMonster.Headless.BrowserHostOptions? = null optional
Port and page title.

Returns

BrowserHost The running host; dispose it to stop.

Properties

public Uri Address { get; } #

The page address, including the token (http://127.0.0.1:port/?t=…). Treat it like a password.