diff options
author | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2018-04-16 23:29:43 +0800 |
---|---|---|
committer | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2018-04-19 04:30:22 +0800 |
commit | 603c1310ffc0cdb61a66f68b8240e76c2ae7cb04 (patch) | |
tree | e555cd0a7d6269adc636d14ee3650aac133fdc77 /app/scripts/platforms | |
parent | 061975cd4a92dfcff7c98c2ab34290b8680c5545 (diff) | |
download | tangerine-wallet-browser-603c1310ffc0cdb61a66f68b8240e76c2ae7cb04.tar tangerine-wallet-browser-603c1310ffc0cdb61a66f68b8240e76c2ae7cb04.tar.gz tangerine-wallet-browser-603c1310ffc0cdb61a66f68b8240e76c2ae7cb04.tar.bz2 tangerine-wallet-browser-603c1310ffc0cdb61a66f68b8240e76c2ae7cb04.tar.lz tangerine-wallet-browser-603c1310ffc0cdb61a66f68b8240e76c2ae7cb04.tar.xz tangerine-wallet-browser-603c1310ffc0cdb61a66f68b8240e76c2ae7cb04.tar.zst tangerine-wallet-browser-603c1310ffc0cdb61a66f68b8240e76c2ae7cb04.zip |
Add a few missing docblocks to background files
Diffstat (limited to 'app/scripts/platforms')
-rw-r--r-- | app/scripts/platforms/sw.js | 27 | ||||
-rw-r--r-- | app/scripts/platforms/window.js | 23 |
2 files changed, 30 insertions, 20 deletions
diff --git a/app/scripts/platforms/sw.js b/app/scripts/platforms/sw.js index 007d8dc5b..56c5f2774 100644 --- a/app/scripts/platforms/sw.js +++ b/app/scripts/platforms/sw.js @@ -1,20 +1,25 @@ - class SwPlatform { - - // - // Public - // - + /** + * Reloads the platform + */ reload () { - // you cant actually do this - global.location.reload() + // TODO: you can't actually do this + /** @type {any} */ (global).location.reload() } - openWindow ({ url }) { - // this doesnt actually work - global.open(url, '_blank') + /** + * 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>' } diff --git a/app/scripts/platforms/window.js b/app/scripts/platforms/window.js index 1527c008b..943b2a703 100644 --- a/app/scripts/platforms/window.js +++ b/app/scripts/platforms/window.js @@ -1,18 +1,23 @@ - class WindowPlatform { - - // - // Public - // - + /** + * Reload the platform + */ reload () { - global.location.reload() + /** @type {any} */ (global).location.reload() } - openWindow ({ url }) { - global.open(url, '_blank') + /** + * 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>' } |