mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-26 12:29:06 +01:00
28 lines
464 B
JavaScript
28 lines
464 B
JavaScript
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
|