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 {
constructor(container, assetPaths, config, options = null, cryptoExtras = null) {
constructor({ container, assetPaths, config, options = null, cryptoExtras = null }) {
this._container = container;
this._assetPaths = assetPaths;
this._config = config;

View file

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