JSFiddle - React, Tailwind, and code Playground

HTML

<!-- the call MUST be with event -->
<div onload="some_function(event)">Foo</div>

JavaScript

// the parameter name can be any name you want
function some_function(evt)
{
    if (evt.currentTarget){
    	return 
    }else{
    document.getElementsByTagName('div').addEventListener('click',function(){
       alert('Yes');
    });
    }
    console.log(evt);
}