function workerThreadReceivedMessage(e)
	{
		var msg = e.data;

		if (typeof WORKER_ID === 'undefined' && msg)
			WORKER_ID = msg.workerId;

		if (typeof msg.input === 'string')
		{
			global.postMessage({
				workerId: WORKER_ID,
				results: parse(msg.input, msg.config),
				finished: true
			});
		}
		else if ((global.File && msg.input instanceof File) || msg.input instanceof Object)	// thank you, Safari (see issue #106)
		{
			var results = parse(msg.input, msg.config);
			if (results)
				global.postMessage({
					workerId: WORKER_ID,
					results: results,
					finished: true
				});
		}
	}
/** Callback when worker thread receives a message */
Callback when worker thread receives a message
Callback when worker thread receives a message
function workerThreadReceivedMessage(e)
	{
		var msg = e.data;
		if (typeof WORKER_ID === 'undefined' && msg)
			WORKER_ID = msg.workerId;
		if (typeof msg.input === 'string')
		{
			global.postMessage({
				workerId: WORKER_ID,
				results: parse(msg.input, msg.config),
				finished: true
			});
		}
		else if ((global.File && msg.input instanceof File) || msg.input instanceof Object)	
		{
			var results = parse(msg.input, msg.config);
			if (results)
				global.postMessage({
					workerId: WORKER_ID,
					results: results,
					finished: true
				});
		}
	}
function workerThreadReceivedMessage ( e ) { var msg = e . data ; if ( typeof WORKER_ID === 'undefined' && msg ) WORKER_ID = msg . workerId ; if ( typeof msg . input === 'string' ) { global . postMessage ( { workerId : WORKER_ID , results : parse ( msg . input , msg . config ) , finished : true } ) ; } else if ( ( global . File && msg . input instanceof File ) || msg . input instanceof Object ) { var results = parse ( msg . input , msg . config ) ; if ( results ) global . postMessage ( { workerId : WORKER_ID , results : results , finished : true } ) ; } }
Callback when worker thread receives a message
Callback when worker thread receives a message
// thank you, Safari (see issue #106)