MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / showUnexpectedErrorPopup

Function showUnexpectedErrorPopup

wasm/error.js:35–62  ·  view source on GitHub ↗
(settings)

Source from the content-addressed store, hash-verified

33};
34
35var showUnexpectedErrorPopup = function (settings) {
36 var { overlay, popup } = createOverlayPopup('show_unexpected_error_dialog', settings.title, settings.width, settings.height, true, false);
37
38 var content = document.createElement('div');
39 content.setAttribute('style', 'margin: 50px 20px 20px 20px;display: flex;flex-direction: column;align-items: center;gap: 20px;');
40
41 var label = document.createElement('label');
42 label.setAttribute('style', 'font-size: 14px;color: #fff;');
43 label.innerHTML = settings.messageText;
44 label.setAttribute('class', 'unselectable');
45
46 var buttons = document.createElement('div');
47 buttons.setAttribute('style', 'display: flex;gap: 10px');
48
49 for (const buttonElement of settings.buttonElements) {
50 buttonElement.setAttribute('style', 'text-decoration: none;width: 200px;height: 28px;border-radius: 4px;color: #fff;font-size: 14px;font-weight: 600;border: none;display: flex;align-items: center;justify-content: center;');
51 buttonElement.setAttribute('class', 'button unselectable');
52 buttons.appendChild(buttonElement);
53 }
54
55 content.appendChild(label);
56 content.appendChild(buttons);
57
58 popup.appendChild(content);
59
60 removeKeyboardEvents();
61 document.body.appendChild(overlay);
62};
63
64var registerErrorHandling = function () {
65 quit_ = function (status, toThrow) {

Callers 1

unexpectedErrorFunction · 0.85

Calls 2

createOverlayPopupFunction · 0.85
removeKeyboardEventsFunction · 0.85

Tested by

no test coverage detected