
Product
Secure Your AI-Generated Code with Socket MCP
Socket MCP brings real-time security checks to AI-generated code, helping developers catch risky dependencies before they enter the codebase.
show-js-error
Advanced tools
Shows a message when an js error occurs in a browser.
Useful for developing and testing your site on mobile phones, tablets and desktop.
Shortly:
Detail:
npm install show-js-error --save-dev
With default settings:
<link rel="stylesheet" href="https://unpkg.com/show-js-error/dist/show-js-error.css" />
<script src="https://unpkg.com/show-js-error/dist/show-js-error.js"></script>
or with own settings:
<link rel="stylesheet" href="https://unpkg.com/show-js-error/dist/show-js-error.css" />
<script src="https://unpkg.com/show-js-error/dist/show-js-error.js"></script>
window.showJSError.setSettings({
reportUrl: 'https://github.com/hcodes/show-js-error/issues/new?title={title}&body={body}'
});
<link rel="stylesheet" href="./node_modules/show-js-error/dist/show-js-error.css" />
With default settings:
import { ShowJSError } from 'show-js-error'; // default settings
const showJSError = new ShowJSError();
or with own settings:
import { ShowJSError } from 'show-js-error';
const showJSError = new ShowJSError();
showJSError.setSettings({
reportUrl: 'https://github.com/hcodes/show-js-error/issues/new?title={title}&body={body}'
});
Set settings for error panel.
showJSError.setSettings({
reportUrl: 'https://github.com/hcodes/show-js-error/issues/new?title={title}&body={body}', // Default: ""
templateDetailedMessage: 'My title\n{message}',
})
Clear errors for error panel.
Show error panel.
showJSError.show();
Show error panel with transmitted error.
showJSError.show({
title: 'My title',
message: 'My message',
filename: 'My filename',
stack: 'My stack',
lineno: 100,
colno: 3
});
// or
showJSError.show('My error');
// or
showJSError.show(new Error('My error'));
Hide error panel.
Toggle detailed info about current error.
Deattach error panel from page, remove global event listeners.
MIT License
v3.0.0
.clear()
, .toggleView()
.copyText
, sendText
, additionalText
, userAgent
, helpLinks
.sendUrl
setting replaced with reportUrl
.FAQs
Show a message about a js error in any browser
The npm package show-js-error receives a total of 3,001 weekly downloads. As such, show-js-error popularity was classified as popular.
We found that show-js-error demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket MCP brings real-time security checks to AI-generated code, helping developers catch risky dependencies before they enter the codebase.
Security News
As vulnerability data bottlenecks grow, the federal government is formally investigating NIST’s handling of the National Vulnerability Database.
Research
Security News
Socket’s Threat Research Team has uncovered 60 npm packages using post-install scripts to silently exfiltrate hostnames, IP addresses, DNS servers, and user directories to a Discord-controlled endpoint.