   autofocusElement = (list = document.querySelectorAll 'input[autofocus], textarea[autofocus]')[list.length - 1]
   if autofocusElement and document.activeElement isnt autofocusElement
     autofocusElement.focus()
-    
+
 reflectNewUrl = (url) ->
   if (url = new ComponentUrl url).absolute isnt referer
     window.history.pushState { turbolinks: true, url: url.absolute }, '', url.absolute



# The Click class handles clicked links, verifying if Turbolinks should
# take control by inspecting both the event and the link. If it should, 
# the page change process is initiated. If not, control is passed back 
# to the browser for default functionality. 
class Click
  @installHandlerLast: (event) ->
    unless event.defaultPrevented

  allowLinkExtensions: Link.allowExtensions,
  supported: browserSupportsTurbolinks,
  EVENTS: clone(EVENTS)
}
