     return "hidden" if `"hidden" in document`
     return "#{prefix}Hidden" for prefix in prefixes when `prefix + "Hidden" in document`
     return ""
-
-  isFocused = -> Boolean document[getVisibilityProperty()]
 
   getVisibilityEventName = ->
     return "#{getVisibilityProperty().replace(/[Hh]idden/, '')}visibilitychange"

      @unloadListeners[key] = []
    else
      @unloadListeners = {}

  addFocusListener: (listener)-> @focusListeners.push listener


      cookie = $.cookie 'clientId'

    document.addEventListener getVisibilityEventName(), (event)=>
      @focusChange event, @isFocused()

  addUnloadListener:(key, listener)->
    listeners = @unloadListeners[key] or= []
