From 0f5ce3c78c16b48917e73a62d6025fd0ded9d211 Mon Sep 17 00:00:00 2001 From: michael Date: Wed, 16 May 2018 07:06:16 +0000 Subject: [PATCH] * Added requestAnimationFrame --- packages/rtl/web.pas | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/rtl/web.pas b/packages/rtl/web.pas index 896c578..2d17133 100644 --- a/packages/rtl/web.pas +++ b/packages/rtl/web.pas @@ -1580,6 +1580,8 @@ Type end; { TJSWindow } + TJSDOMHighResTimeStamp = Double; + TFrameRequestCallback = procedure (aTime: TJSDOMHighResTimeStamp); TJSWindowArray = Array of TJSWindow; TJSWindow = class external name 'Window' (TJSObject) @@ -1689,6 +1691,7 @@ Type Procedure clearInterval(aID: NativeInt); Procedure clearTimeout(aID: NativeInt); Function btoa(Const aValue : string) : string; + procedure cancelAnimationFrame(aHandle: Integer); Procedure close; Function confirm(Const aMsg : String) : boolean; procedure focus; @@ -1706,6 +1709,7 @@ Type 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); @@ -1714,7 +1718,7 @@ Type Function setTimeout(ahandler : TJSTimerCallBack; aTimeout : NativeUInt) : NativeInt; varargs; Function setTimeout(ahandler : TJSTimerCallBack) : NativeInt; procedure stop; - + { public methods } property console : TJSConsole Read FConsole; property closed : boolean read FClosed; property crypto : TJSCrypto Read FCrypto;