Fix WallixModule.ready access - WallixModule is already the Promise

- WallixModule is the Promise returned by the IIFE, not an object with .ready property
- Use WallixModule.then((module) => { ... }) to access the loaded module
- Rebuild project to embed updated HTML template
parent acf0e7f1
......@@ -305,9 +305,9 @@ function connect() {
socket.onopen = () => {
// Wait for WebAssembly module to be ready
WallixModule.ready.then(() => {
WallixModule.then((module) => {
const canvas = document.getElementById('canvas');
const gd = newRdpGraphics2D(canvas, WallixModule);
const gd = newRdpGraphics2D(canvas, module);
const config = {
width: 1024,
height: 768,
......@@ -317,7 +317,7 @@ function connect() {
bpp: 32,
verbosity: 0
};
rdpclient = new WallixModule.RdpClient(gd, config);
rdpclient = new module.RdpClient(gd, config);
rdpclient.writeFirstPacket();
sendData();
connected = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment