resFactory / factory

Resource Factory is a universal approach to originating, refining, and rendering Markdown, HTML, type-safe SQL, or other assets that could comprise static sites or engineering artifacts.
GNU Affero General Public License v3.0
0 stars 3 forks source link

Add error event listener to all pages which records client-side issues #65

Open shah opened 2 years ago

shah commented 2 years ago

Add the following to all pages:

document.addEventListener('error', (e) => {
    // serialize e and send it to Prometheus or other metrics logger
}, true)

For Markdown, add onerror for img and other elements as HTML is generated using customize() method.