2017-04-05 03:23:46 +02:00
|
|
|
class WindowPlatform {
|
2018-04-16 17:29:43 +02:00
|
|
|
/**
|
|
|
|
* Reload the platform
|
|
|
|
*/
|
2017-04-05 03:23:46 +02:00
|
|
|
reload () {
|
2018-04-16 17:29:43 +02:00
|
|
|
/** @type {any} */ (global).location.reload()
|
2017-04-05 03:23:46 +02:00
|
|
|
}
|
|
|
|
|
2018-04-16 17:29:43 +02:00
|
|
|
/**
|
|
|
|
* Opens a window
|
|
|
|
* @param {{url: string}} opts - The window options
|
|
|
|
*/
|
|
|
|
openWindow (opts) {
|
|
|
|
/** @type {any} */ (global).open(opts.url, '_blank')
|
2017-04-05 03:23:46 +02:00
|
|
|
}
|
|
|
|
|
2018-04-16 17:29:43 +02:00
|
|
|
/**
|
|
|
|
* Returns the platform version
|
|
|
|
* @returns {string}
|
|
|
|
*/
|
2017-04-05 03:23:46 +02:00
|
|
|
getVersion () {
|
|
|
|
return '<unable to read version>'
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2020-01-09 04:34:58 +01:00
|
|
|
export default WindowPlatform
|