dist/hello.all.js
function(callback, guid) {
		// If the guid has not been supplied then create a new one.
		guid = guid || '_hellojs_' + parseInt(Math.random() * 1e12, 10).toString(36);

		// Define the callback function
		window[guid] = function() {
			// Trigger the callback
			try {
				if (callback.apply(this, arguments)) {
					delete window[guid];
				}
			}
			catch (e) {
				console.error(e);
			}
		};

		return guid;
	}
function(callback, guid) {
		// If the guid has not been supplied then create a new one.
		guid = guid || '_hellojs_' + parseInt(Math.random() * 1e12, 10).toString(36);

		// Define the callback function
		window[guid] = function() {
			// Trigger the callback
			try {
				if (callback.apply(this, arguments)) {
					delete window[guid];
				}
			}
			catch (e) {
				console.error(e);
			}
		};

		return guid;
	}
function ( callback , guid ) { // If the guid has not been supplied then create a new one. guid = guid || '_hellojs_' + parseInt ( Math . random ( ) * 1e12 , 10 ) . toString ( 36 ) ; // Define the callback function window [ guid ] = function ( ) { // Trigger the callback try { if ( callback . apply ( this , arguments ) ) { delete window [ guid ] ; } } catch ( e ) { console . error ( e ) ; } } ; return guid ; }
Global Events Attach the callback to the window object Return its unique reference
Global Events Attach the callback to the window object Return its unique reference