JSFiddle - React, Tailwind, and code Playground

HTML

<div onclick="alert('click')" onchange="alert('change')" onhogehoge="alert('hogehoge')">
test
</div>

JavaScript

var onAttributes = Object.getOwnPropertyNames(HTMLElement.prototype).filter( x => x.startsWith('on') );
document.querySelectorAll('*').forEach( e => onAttributes.forEach( p => e[p] && console.log(e[p].toSource()) ) );