mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2025-02-02 07:31:38 +01:00
Use named params
This commit is contained in:
parent
480c5c1584
commit
2cfcd4653f
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user