1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-27 21:00:13 +01:00
metamask-extension/app/scripts/platforms/sw.js
2018-04-18 18:00:22 -02:30

30 lines
537 B
JavaScript

class SwPlatform {
/**
* Reloads the platform
*/
reload () {
// TODO: you can't actually do this
/** @type {any} */ (global).location.reload()
}
/**
* Opens a window
* @param {{url: string}} opts - The window options
*/
openWindow (opts) {
// TODO: this doesn't actually work
/** @type {any} */ (global).open(opts.url, '_blank')
}
/**
* Returns the platform version
* @returns {string}
*/
getVersion () {
return '<unable to read version>'
}
}
module.exports = SwPlatform