Use named params

This commit is contained in:
RMidhunSuresh 2022-04-20 12:00:33 +05:30
parent 480c5c1584
commit 2cfcd4653f
2 changed files with 6 additions and 5 deletions

View file

@ -126,7 +126,7 @@ function adaptUIOnVisualViewportResize(container) {
} }
export class Platform { export class Platform {
constructor(container, assetPaths, config, options = null, cryptoExtras = null) { constructor({ container, assetPaths, config, options = null, cryptoExtras = null }) {
this._container = container; this._container = container;
this._assetPaths = assetPaths; this._assetPaths = assetPaths;
this._config = config; this._config = config;

View file

@ -22,11 +22,12 @@
if (import.meta.env.PROD) { if (import.meta.env.PROD) {
assetPaths.serviceWorker = "sw.js"; assetPaths.serviceWorker = "sw.js";
} }
const platform = new Platform( const platform = new Platform({
document.body, container: document.body,
assetPaths, assetPaths,
JSON.parse(configJSON), config: JSON.parse(configJSON),
{development: import.meta.env.DEV} options: {development: import.meta.env.DEV}
}
); );
main(platform); main(platform);
</script> </script>