JSFiddle - React, Tailwind, and code Playground

by Irvin Dominin

HTML

<div data-execute="someFunction.abc" id="someId">Some Function</div>

JavaScript

var someFunction = function (p) {
    alert(p)
}
var load = (function (module, global) {
    var x = document.getElementById("someId").getAttribute('data-execute');
    window[x.split('.')[0]].call(undefined, x.split('.')[1]);

}(load || {}, this))