added hook to crash the program (to test the reporter)
This commit is contained in:
parent
c6952b54c7
commit
1e77671156
|
@ -18,3 +18,13 @@ electron.crashReporter.start({
|
||||||
prop: 'some string value',
|
prop: 'some string value',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// If we are in a render thread add a hook catch clicks on "crasher" buttons
|
||||||
|
// that will crash the program
|
||||||
|
if (typeof document !== 'undefined') {
|
||||||
|
document.body.addEventListener('click', function (ev) {
|
||||||
|
if (ev.target.classList.contains('crasher')) {
|
||||||
|
process.crash();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
|
@ -14,9 +14,14 @@
|
||||||
<button class="start-notify">Start</button>
|
<button class="start-notify">Start</button>
|
||||||
<button class="stop-notify">Stop</button>
|
<button class="stop-notify">Stop</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="drag-n-drop">
|
<div class="drag-n-drop">
|
||||||
<h3>Drag and Drop Area</h3>
|
<h3>Drag and Drop Area</h3>
|
||||||
<div class="file-container"></div>
|
<div class="file-container"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<button class="crasher">Crash Program</button>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in New Issue