Provides HTML mirroring of browser console logs. Intrusively somewhat console.log()
is redeclared in order to echo the original output inside of a <pre>
tag added at the very top of the document.body
containing the script carrying out the logging. Ties in nicely with tapeless and kpow for client side TAP reporting.
Download from GitHub directly if using a package manager:
# Add to package.json
npm install cutaway
Source from an import map:
{
"imports": {
"cutaway": "https://thewhodidthis.github.io/cutaway/main.js"
}
}
Include for side effects only. For example,
// Just an iife
import "https://esm.sh/[email protected]"
// Say hi in HTML
console.log("coucou")