helloitsjoe / dom-debug

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DOM Debug

A debug panel for the DOM

import { createDebug } from "dom-debug";

const debug = createDebug({ enabled: true, classes: ["foo"] });

debug("Hello");

When enabled, calling debug(message) will print the message into a debug panel and log it to the console. Click the debug panel to hide it. Pass in classes to add additional classes to the panel, or hiddenClass to override the default hidden class. Default classes:

  • Panel: debug-panel
  • Title: debug-panel__title
  • Hidden: debug-panel__hidden
  • Messages: debug-panel__message

When enabled is false, messages will be logged to the console.

About


Languages

Language:JavaScript 64.7%Language:CSS 35.3%