JSFiddle - React, Tailwind, and code Playground

by peterbenoit

HTML

<p>All output in console</p>

JavaScript

var CDC = CDC || {};
CDC.load = CDC.load || (function (l, v, a, c) {
	var args = [], //.slice.apply(arguments);
		library = l.toLowerCase(),
		b = (typeof v !== 'undefined') ? v.split('.') : [],
		major = parseInt(b[0], 10),
		minor = parseInt(b[1], 10),
		point = parseInt(b[2], 10),
		callback = typeof c !== 'undefined' ? true : false,
		isAsync = a,
		useCDNJS = true;										//WARN: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

	// if we have a callback and it's not a function, throw an error    
	if (callback && typeof c !== 'function') {
		throw ": Callback is not a function!";
	}

	// small helper function to build the script reference    
	var buildScript = function (build, script) {
		var src = useCDNJS ? '//cdnjs.cloudflare.com/ajax/libs/' + library + '/' + build + '/' + script : build + '/' + script,
			l = document.createElement('script'),
			s = document.getElementsByTagName('head')[0] || document.body.parentNode.appendChild(document.createElement('head'));
		l.type = 'text/javascript';
		l.async = isAsync;                 //TODO: variable
		l.src = src;
		s.appendChild(l, s);  //s.parentNode.insertBefore(l, s);

		// if there's a call back, go ahead and call it.
		if (callback) {
			c.apply(this, args);
		}
	};

	// callback may contain params, account for them
	if (arguments.length > 4) {
		for (var i = 4, max = arguments.length; i < max; i++) {
			args.push(arguments[i]);
		}
	}

	// JSON object of libraries and versions, ordered in(very important!) most recent to oldest
	var libraries = {
		"jquery": {
			"versions": {
				"2.1.1": {
					"uncompressed": "jquery.js",
						"compressed": "jquery.min.js"
				},
					"1.11.1": {
					"uncompressed": "jquery.js",
						"compressed": "jquery.min.js"
				},
					"1.9.1": {
					"uncompressed": "jquery.js",
						"compressed": "jquery.min.js"
				}
			}
		},
			"jquery-ui": {
			"versions": {
				"1.10.4": {
					"uncompressed": "jquery-ui.js",
						"compressed":...