ElyDoc, ElyTable, ElyShow (LibreOfficeKit), ElyPDF (MuPDF), ElyTree (Git), ElyMark (Milkdown and CodeMirror in CEF). ElyMail and ElyAgent follow.
12 lines
402 B
JavaScript
12 lines
402 B
JavaScript
/** The source as saved, and why it did not render. */
|
|
export function failure(source, message, at) {
|
|
const box = document.createElement('div')
|
|
box.className = 'ely-failure'
|
|
const why = document.createElement('p')
|
|
why.textContent = at === undefined ? message : `${message} (${at})`
|
|
const code = document.createElement('pre')
|
|
code.textContent = source
|
|
box.append(why, code)
|
|
return box
|
|
}
|