<browser-console>

A zero-dependency vanilla JavaScript web component that captures and displays browser console output with syntax highlighting and type-aware formatting.

Features

Quick Start

Installation

npm install @profpowell/browser-console

Or via CDN:

<script type="module" src="https://unpkg.com/@profpowell/browser-console"></script>

Basic Usage

<browser-console theme="dark" max-logs="500"></browser-console>

The component automatically hooks into console methods and displays all logs with syntax highlighting. Just add it to your page and start logging!

JavaScript API

const bc = document.querySelector('browser-console') // Programmatic control bc.setTheme('light') bc.setFilter('error') // Show only errors bc.setSearchQuery('user') // Filter by text bc.clearLogs() // Clear all logs bc.copyLogs() // Copy to clipboard