B2G/gecko/toolkit/content/PopupNotifications.jsm
/**
   * Called by the consumer to indicate that the current browser's location has
   * changed, so that we can update the active notifications accordingly.
   */
Called by the consumer to indicate that the current browser's location has
changed, so that we can update the active notifications accordingly.
Called by the consumer to indicate that the current browser ' s location has changed so that we can update the active notifications accordingly .
function PopupNotifications_locationChange() {
    this._currentNotifications = this._currentNotifications.filter(function(notification) {
      if (notification.options.persistWhileVisible &&
          this.isPanelOpen) {
        if ("persistence" in notification.options &&
          notification.options.persistence)
          notification.options.persistence--;
        return true;
      }
      if ("persistence" in notification.options &&
          notification.options.persistence) {
        notification.options.persistence--;
        return true;
      }
      if ("timeout" in notification.options &&
          Date.now() <= notification.options.timeout) {
        return true;
      }
      this._fireCallback(notification, NOTIFICATION_EVENT_REMOVED);
      return false;
    }, this);
    this._update();
  }
function PopupNotifications_locationChange ( ) { this . _currentNotifications = this . _currentNotifications . filter ( function ( notification ) { if ( notification . options . persistWhileVisible && this . isPanelOpen ) { if ( "persistence" in notification . options && notification . options . persistence ) notification . options . persistence -- ; return true ; } if ( "persistence" in notification . options && notification . options . persistence ) { notification . options . persistence -- ; return true ; } if ( "timeout" in notification . options && Date . now ( ) <= notification . options . timeout ) { return true ; } this . _fireCallback ( notification , NOTIFICATION_EVENT_REMOVED ) ; return false ; } , this ) ; this . _update ( ) ; }
Called by the consumer to indicate that the current browser's location has
 changed, so that we can update the active notifications accordingly.
Called by the consumer to indicate that the current browser ' s location has changed so that we can update the active notifications accordingly .
// The persistWhileVisible option allows an open notification to persist // across location changes // The persistence option allows a notification to persist across multiple // page loads // The timeout option allows a notification to persist until a certain time