mirror of
				https://github.com/Jermolene/TiddlyWiki5
				synced 2025-10-31 15:42:59 +00:00 
			
		
		
		
	Use window.setTimeout(fn,0) for $tw.utils.nextTick in the browser
It seems that best practice has now moved to using zero: https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout
This commit is contained in:
		| @@ -618,7 +618,7 @@ exports.nextTick = function(fn) { | ||||
| /*global window: false */ | ||||
| 	if(typeof process === "undefined") { | ||||
| 		// Apparently it would be faster to use postMessage - http://dbaron.org/log/20100309-faster-timeouts | ||||
| 		window.setTimeout(fn,4); | ||||
| 		window.setTimeout(fn,0); | ||||
| 	} else { | ||||
| 		process.nextTick(fn); | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 jeremy@jermolene.com
					jeremy@jermolene.com