JSFiddle - React, Tailwind, and code Playground
HTML
<!-- PLEASE OPEN YOUR JAVASCRIPT CONSOLE! -->
<!-- http://blog.kevinchisholm.com/json-javascript/problems-making-jsonp-calls-in-jsfiddle -->
<!-- here we explicitly force "myCallback" to be a property of the window object, and again, the JSONP call now works -->
JavaScript
window.myCallback = function(data){
console.dir(data);
},
script = document.createElement('script');
script.src = 'http://examples.kevinchisholm.com/utils/json/jsonp.php?callback=myCallback';
document.getElementsByTagName('head')[0].appendChild(script);