JSFiddle - React, Tailwind, and code Playground
by murdoch84
JavaScript
// test onclick
var el = document.createElement('div');
var eventName = 'onclick';
el.setAttribute(eventName, 'return;');
var onclickSupported = typeof el[eventName] == 'function';
alert('onclick: ' + onclickSupported);
// test ontransitionend
var el = document.createElement('div');
var eventName = 'ontransitionend';
el.setAttribute(eventName, 'return;');
var ontransitionendSupported = typeof el[eventName] == 'function';
alert('ontransitionend: ' + ontransitionendSupported);