Use named params
This commit is contained in:
parent
480c5c1584
commit
2cfcd4653f
2 changed files with 6 additions and 5 deletions
|
@ -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;
|
||||
|
|
|
@ -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>
|
||||
|
|
Reference in a new issue