code: function _Browser_application(impl)
  {
  	var onUrlChange = impl.__$onUrlChange;
  	var onUrlRequest = impl.__$onUrlRequest;
  	var key = function() { key.__sendToApp(onUrlChange(_Browser_getUrl())); };
  
  	return _Browser_document({
  		__$setup: function(sendToApp)
  		{
  			key.__sendToApp = sendToApp;
  			_Browser_window.addEventListener('popstate', key);
  			_Browser_window.navigator.userAgent.indexOf('Trident') < 0 || _Browser_window.addEventListener('hashchange', key);
  
  			return F2(function(domNode, event)
  			{
  				if (!event.ctrlKey && !event.metaKey && !event.shiftKey && event.button < 1 && !domNode.target && !domNode.download)
  				{
  					event.preventDefault();
  					var href = domNode.href;
  					var curr = _Browser_getUrl();
  					var next = __Url_fromString(href).a;
  					sendToApp(onUrlRequest(
  						(next
  							&& curr.__$protocol === next.__$protocol
  							&& curr.__$host === next.__$host
  							&& curr.__$port_.a === next.__$port_.a
  						)
  							? __Browser_Internal(next)
  							: __Browser_External(href)
  					));
  				}
  			});
  		},
  		__$init: function(flags)
  		{
  			return A3(impl.__$init, flags, _Browser_getUrl(), key);
  		},
  		__$view: impl.__$view,
  		__$update: impl.__$update,
  		__$subscriptions: impl.__$subscriptions
  	});
  }
docs: APPLICATION