mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-09-23 23:49:24 +02:00
* Use hostconfig provided wasm file
This commit is contained in:
parent
87631018bc
commit
f1af18918c
@ -46,8 +46,20 @@ Type
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMyApplication.DoRun;
|
procedure TMyApplication.DoRun;
|
||||||
|
var
|
||||||
|
wasm : String;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
StartWebAssembly('wasmregexpdemo.wasm');
|
Terminate;
|
||||||
|
if Assigned(HostConfig) and isString(HostConfig.wasmFilename) then
|
||||||
|
Wasm:=HostConfig.wasmFilename
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
Wasm:=ParamStr(1);
|
||||||
|
if Wasm='' then
|
||||||
|
Wasm:='wasmregexpdemo.wasm';
|
||||||
|
end;
|
||||||
|
StartWebAssembly(wasm);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMyApplication.HandleLogClick(Event : TJSEvent);
|
procedure TMyApplication.HandleLogClick(Event : TJSEvent);
|
||||||
|
Loading…
Reference in New Issue
Block a user