aboutsummaryrefslogblamecommitdiffstats
path: root/app/scripts/platforms/window.js
blob: 943b2a703298c7539a2e0083a775a22e69e6e43f (plain) (tree)
1
2
3
4
5
6
7
8
                      


                        
             
                                                 

   





                                                        

   



                                 






                                     
class WindowPlatform {
  /**
   * Reload the platform
   */
  reload () {
    /** @type {any} */ (global).location.reload()
  }

  /**
   * Opens a window
   * @param {{url: string}} opts - The window options
   */
  openWindow (opts) {
    /** @type {any} */ (global).open(opts.url, '_blank')
  }

  /**
   * Returns the platform version
   * @returns {string}
   */
  getVersion () {
    return '<unable to read version>'
  }

}

module.exports = WindowPlatform