🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

show-js-error

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

show-js-error

Show a message about a js error in any browser

1.3.0
Source
npm
Version published
Weekly downloads
3.9K
-28.66%
Maintainers
1
Weekly downloads
 
Created
Source

Show js error

NPM version NPM Downloads Dependency Status

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:
Shortly

Detail:
Detail

Browsers

Any.

Install

npm install show-js-error --save-dev

Using

<link rel="stylesheet" href="./node_modules/show-js-error/dist/show-js-error.css" />
<script src="./node_modules/show-js-error/dist/show-js-error.js"></script>

or

<link rel="stylesheet" href="./node_modules/show-js-error/dist/show-js-error.css" />
<script src="./node_modules/show-js-error/dist/show-js-error.custom.js"></script>
<script>
    showJSError.init({
        title: 'JavaScript error',
        userAgent: navigator.userAgent,
        sendText: 'Send 🐛',
        sendUrl: 'https://github.com/hcodes/show-js-error/issues/new?title={title}&body={body}'
    });
</script>

Show custom error

showJSError.show({
    title: 'My title',
    message: 'My message',
    filename: 'My filename',
    stack: 'My stack',
    lineno: 100,
    colno: 3,
    userAgent: 'OS X Yosemite, Safari 8'
});

// or
showJSError.show('Hello error!');

// or
var err = new Error();
showJSError.show(err);

Example

License

MIT License

Keywords

error

FAQs

Package last updated on 24 Apr 2016

Did you know?

Socket

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.

Install

Related posts