src/lib/page-lifecycle.js
/**
   * @param {Symbol|Object} id A unique symbol or object identifying the
   *.    pending state. This ID is required when removing the state later.
   */
@param {Symbol|Object} id A unique symbol or object identifying the
.    pending state. This ID is required when removing the state later.
@param { Symbol|Object } id A unique symbol or object identifying the . pending state . This ID is required when removing the state later .
removeUnsavedChanges(id) {
    const idIndex = this._unsavedChanges.indexOf(id);
    if (idIndex > -1) {
      this._unsavedChanges.splice(idIndex, 1);
      if (this._unsavedChanges.length === 0) {
        removeEventListener(EVENT_BEFOREUNLOAD, onbeforeunload);
      }
    }
  }
removeUnsavedChanges ( id ) { const idIndex = this . _unsavedChanges . indexOf ( id ) ; if ( idIndex > - 1 ) { this . _unsavedChanges . splice ( idIndex , 1 ) ; if ( this . _unsavedChanges . length === 0 ) { removeEventListener ( EVENT_BEFOREUNLOAD , onbeforeunload ) ; } } }
@param {Symbol|Object} id A unique symbol or object identifying the
.
@param { Symbol|Object } id A unique symbol or object identifying the .
// If there's no more pending state, remove the event listener.