JSFiddle - React, Tailwind, and code Playground

by steveukx

CSS

html { font: 10pt/1.5 sans-serif; }
p { margin: 0; padding: 0.125rem 0.25rem; }

JavaScript

function handler (e) {
    e.stopPropagation();
    e.preventDefault();
    
    document.body.insertAdjacentHTML("beforeEnd", 
                                     "<p>" + e.type + " : " + e.which + "</p>");
}

["touchstart", "touchmove", "touchstop", "click"]
.forEach(function (evt) {
    document.addEventListener(evt, handler, false);
});