JavaScript
Last updated
Was this helpful?
Was this helpful?
const bugsplat = new BugSplat('fred', 'my-javascript-crasher', '1.0.0');window.onerror = function (message, source, lineno, colno, error) {
bugsplat.post(error);
};
window.addEventListener('unhandledrejection', function (event) {
bugsplat.post(event.reason);
});throw new Error('todo bg');await bugsplat.postFeedback('Login button broken', {
description: 'Nothing happens when I tap it',
email: 'jane@example.com',
});const screenshot = document.querySelector('input[type="file"]').files[0];
await bugsplat.postFeedback('UI rendering issue', {
description: 'The sidebar overlaps the main content.',
attachments: [
{ filename: 'screenshot.png', data: screenshot },
],
});git clone https://github.com/BugSplat-Git/my-javascript-crashercd my-javascript-crasher
npm inpm start