mattias před 11 měsíci
rodič
revize
eefc736a93

+ 2 - 2
packages/rtl/src/typinfo.pas

@@ -293,10 +293,10 @@ type
 
   TRecordInfo = class external name 'Object'(TJSObject)
   public
-    function Assign(Source: JSValue): JSValue; external name '$assign';
+    function Assign(Source: JSValue): JSValue; reintroduce; external name '$assign';
     function Clone(Source: JSValue): JSValue; external name '$clone';
     function Equals(Source: JSValue): Boolean; external name '$eq';
-    function New: JSValue; external name '$new';
+    function New: JSValue; reintroduce; external name '$new';
   end;
 
   TTypeInfoRecord = class external name 'rtl.tTypeInfoRecord'(TTypeInfoStruct)

+ 0 - 10
packages/rtl/src/web.pas

@@ -1610,14 +1610,9 @@ Type
     touchend : TJSTouchEventHandler;
     touchmove : TJSTouchEventHandler;
     touchcancel : TJSTouchEventHandler;
-    procedure addEventListener(aname : string; aListener : TJSEventHandler);
-    procedure addEventListener(aname : string; aListener : TJSRawEventHandler);
-    procedure addEventListener(aname : string; aListener : JSValue);
     Procedure alert(Const Msg : String);
     Function atob(Const aValue : string) : string;
     procedure blur;
-    Procedure clearInterval(aID: NativeInt);
-    Procedure clearTimeout(aID: NativeInt);
     Function btoa(Const aValue : string) : string;
     procedure cancelAnimationFrame(aHandle: Integer);
     Procedure close;
@@ -1646,16 +1641,11 @@ Type
     procedure print;
     function prompt(const aMessage : String) : String; overload;
     function prompt(const aMessage,aDefault : String) : String; overload;
-    procedure removeEventListener(aname : string; aListener : TJSEventHandler);
-    procedure removeEventListener(aname : string; aListener : JSValue);
     function requestAnimationFrame(aCallback: TFrameRequestCallback): Integer;
     procedure resizeBy(aWidth,aHeight : NativeInt);
     procedure resizeTo(aWidth,aHeight : NativeInt);
     procedure scrollBy(x,y : NativeInt);
     procedure scrollTo(x,y : NativeInt);
-    Function setInterval(ahandler : TJSTimerCallBack; aInterval : NativeUInt) : NativeInt; varargs;
-    Function setTimeout(ahandler : TJSTimerCallBack; aTimeout : NativeUInt) : NativeInt; varargs;
-    Function setTimeout(ahandler : TJSTimerCallBack) : NativeInt;
     procedure stop;
     procedure cancelIdleCallback(handle: NativeInt);
     function requestIdleCallback(handler: TIdleCallbackProc): NativeInt; overload;

+ 2 - 2
packages/rtl/src/weborworker.pas

@@ -1346,8 +1346,8 @@ type
     Function setInterval(ahandler : TJSTimerCallBack; aInterval : NativeUInt) : NativeInt; varargs;
     Function setTimeout(ahandler : TJSTimerCallBack; aTimeout : NativeUInt) : NativeInt; varargs;
     Function setTimeout(ahandler : TJSTimerCallBack) : NativeInt;
-    Procedure clearInterval(aID: NativeInt);
-    Procedure clearTimeout(aID: NativeInt);
+    Procedure clearInterval(aID: NativeInt); overload;
+    Procedure clearTimeout(aID: NativeInt); overload;
     procedure queueMicrotask(callback : TJSMicrotaskProcedure);
     Function createImageBitmap(Source : JSValue) : TJSPromise;
     Function createImageBitmap(Source : JSValue; aOptions : TJSImageBitmapOptions) : TJSPromise;

+ 2 - 2
packages/wasi/src/wasihostapp.pas

@@ -8,9 +8,9 @@ interface
 
 uses
 {$IFDEF FPC_DOTTEDUNITS}
-  System.Classes, System.SysUtils, Fcl.App.Browser, JSApi.JS, BrowserApi.WebAssembly, Wasi.Env, BrowserApi.Web, System.Types;
+  System.Classes, System.SysUtils, Fcl.App.Browser, JSApi.JS, BrowserApi.WebAssembly, Wasi.Env;
 {$ELSE} 
-  Classes, SysUtils, browserapp, js, webassembly, wasienv, web, types;
+  Classes, SysUtils, browserapp, js, webassembly, wasienv;
 {$ENDIF}
 
 Type

+ 3 - 2
packages/wasi/src/wasizenfs.pas

@@ -11,9 +11,10 @@ Type
   EWASIZenFS = class(Exception);
 
   { TWASIZenFS }
+
   TWASIZenFS = class (TObject,IWasiFS)
   private
-    FRoot : TZenFSDir;
+    //FRoot : TZenFSDir;
     FDirMap : TJSMap;
   protected
     function AllocateDirFD(aDir: TZenFSDirentArray): Integer;
@@ -426,7 +427,7 @@ function TWASIZenFS.GetPrestat(FD: Integer): String;
 begin
   if (FD=3) then
     begin
-    FRoot:=ZenFS.OpenDirSync('/');
+    {FRoot:=}ZenFS.OpenDirSync('/');
     Result:='/';
     end;
 end;