mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-23 02:10:12 +01:00
92971d3c87
* Update eslint-plugin-import version * Convert JS files to use ESM * Update ESLint rules to check imports * Fix test:unit:global command env * Cleanup mock-dev script
30 lines
535 B
JavaScript
30 lines
535 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>'
|
|
}
|
|
|
|
}
|
|
|
|
export default SwPlatform
|