function onBeforeUnload(event) {
        if (this.activeQuestionIndex > 0 && !this.submitted) {
          event.preventDefault();
          event.returnValue = '';
        }
      }
/**
       * If we have any answered questions, notify user before leaving
       * the page.
       */
If we have any answered questions, notify user before leaving
the page.
If we have any answered questions notify user before leaving the page .
function onBeforeUnload(event) {
        if (this.activeQuestionIndex > 0 && !this.submitted) {
          event.preventDefault();
          event.returnValue = '';
        }
      }
function onBeforeUnload ( event ) { if ( this . activeQuestionIndex > 0 && ! this . submitted ) { event . preventDefault ( ) ; event . returnValue = '' ; } }
If we have any answered questions, notify user before leaving
 the page.
If we have any answered questions notify user before leaving the page .