 	constructor: (html, cookie, @_id = null) ->
 		EventEmitter.call this
 		
-		# Ensure HTML was passed in. 
+		# } Ensure HTML was passed in. 
 		unless html?
 			throw new ReferenceError(
 				"Sandbox expects to be constructed with HTML."

	# *Close a DOM.*
	close: ->
		
		# If the window is already gone, nope out.
		return Promise.resolve() unless @_window?
		
		# Remove from persistent list.
		# 
		# `TODO`: Move to SandboxFactory.
		module.exports.remove @_id
		
		# Wait if the sandbox is busy.
		# 
		# `TODO`: There should be a worker queue, not a single 'busy' promise.
		Promise.cast(
			@_busy
		
		# Run all the registered cleanup functions.
		).bind(this).then(->
		
			Promise.all (fn() for fn in @_cleanupFunctions)
			
		# Suppress cleanup errors.
		).catch(->
			
		# Actually close the window and null it out.
		).finally ->
			
			@_window.close()

		)
		@_window = window = document.createWindow()
		
		# } Capture "client" console logs.
		for level in ['info', 'log', 'debug', 'warn', 'error']
			do (level) -> window.console[level] = (args...) ->
				
				# } Make errors as detailed as possible.
				for arg, i in args
					if arg instanceof Error
						args[i] = errors.stack arg
					else
						arg
				
				# } Let our logger log them.
				logger[level] args... 
				
		# } Hack in WebSocket.
		window.WebSocket = WebSocket
		
		# When the window is loaded, we'll capture any errors, and emit the
