JSFiddle - React, Tailwind, and code Playground

HTML

<div id="box"></div>
<p id="output"></p>

CSS

div {
    background: #279;
    height: 36px;
    width: 36px;
}

JavaScript

var box = document.getElementById('box'),
    output = document.getElementById('output');


box.ondblclick = function () {
    output.innerHTML += "Double Clicked!<br />";
};