Browse Source

* Take into account SendOutputToBrowser (2)

Michael Van Canneyt 5 months ago
parent
commit
d019335646
1 changed files with 2 additions and 1 deletions
  1. 2 1
      packages/wasi/src/wasiworkerthreadhost.pas

+ 2 - 1
packages/wasi/src/wasiworkerthreadhost.pas

@@ -846,7 +846,8 @@ end;
 
 procedure TWorkerThreadControllerApplication.HandleConsoleWrite(Sender: TObject; aOutput: string);
 begin
-  FConsoleChannel.postMessage(TWorkerConsoleCommand.Create(aOutput,0));
+  if SendOutputToBrowser then
+    FConsoleChannel.postMessage(TWorkerConsoleCommand.Create(aOutput,0));
 end;
 
 function TWorkerThreadControllerApplication.HandleCustomCommand(aData : TWorkerCommand) : Boolean;