JSFiddle - React, Tailwind, and code Playground

HTML

<div id="dnd">
    <img id="logo" src="https://www.opto22.com/getmedia/1b3ac443-cdfd-47c1-bd42-49d29e2795a3/download_icon_450.png.aspx?maxsidesize=48" draggable='true'/ >
    <span id="imgout">idle</span><br/>
    <button id="run" draggable='true'>
    Run
    </button>
    <span id="btnout">idle</span>
</div>

JavaScript

run.addEventListener('mousedown', e => {
  btnout.innerText = "down"
});
run.addEventListener('mouseup', e => {
  btnout.innerText += " up"
});
run.addEventListener('click', e => {
  btnout.innerText += " click"
});
run.addEventListener('dragend', e => {
  btnout.innerText += " drag end"
});

logo.addEventListener('mousedown', e => {
  imgout.innerText = "down"
});
logo.addEventListener('mouseup', e => {
  imgout.innerText += " up"
});
logo.addEventListener('click', e => {
  imgout.innerText += " click"
});
logo.addEventListener('dragend', e => {
  imgout.innerText += " drag end"
});