JSFiddle - React, Tailwind, and code Playground

by Dimitar Christoff

JavaScript

window.onerror = function(message, url, line, chr) {
    new Request({
        url: "/errorTrap.php",
        data: {
            m: message,
            u: url,
            l: line,
            c: chr
        },
        method: "get",
        onComplete: function() {
            // perhaps save the rendered html source via a second POST request?    
            alert("done");
        }
    }).send();
    return true;
};

var foo = document.getElement("input").get("value");