JSFiddle - React, Tailwind, and code Playground

by Alexey Ukolov

HTML

<button>Button</button>

JavaScript

function handler() {
  foo();
}

function foo() {
  var event = foo.caller.arguments[0];

  event.preventDefault();
}

document.querySelector('button').addEventListener('click', handler);