src/openui5-todo-app/Component.js
/**
       * The window before unload hook. Override this method in your Component class implementation,
       * to handle cleanup before the real unload or to prompt a question to the user,
       * if the component should be exited.
       * @param {string} sMessage - The error message.
       * @param {string} sFile - File where the error occurred
       * @param {string} iLine - Line number of the error
       * @public
       */
The window before unload hook. Override this method in your Component class implementation,
to handle cleanup before the real unload or to prompt a question to the user,
if the component should be exited.
@param {string} sMessage - The error message.
@param {string} sFile - File where the error occurred
@param {string} iLine - Line number of the error
@public
The window before unload hook . Override this method in your Component class implementation to handle cleanup before the real unload or to prompt a question to the user if the component should be exited . @param { string } sMessage - The error message . @param { string } sFile - File where the error occurred @param { string } iLine - Line number of the error @public
onWindowError(sMessage = '', sFile = '', iLine = 0) {
        if (jQuery.sap.getUriParameters().get('sap-ui-debug') !== 'true') return
        this.showErrorPopup(sMessage, `${sFile}: ${iLine}`)
      }
onWindowError ( sMessage = '' , sFile = '' , iLine = 0 ) { if ( jQuery . sap . getUriParameters ( ) . get ( 'sap-ui-debug' ) !== 'true' ) return this . showErrorPopup ( sMessage , ` ${ sFile } ${ iLine } ` ) }
The window before unload hook.
The window before unload hook .
// only raise window errors in debug mode // display error popup