* Added requestAnimationFrame

This commit is contained in:
michael 2018-05-16 07:06:16 +00:00
parent 1b5bb6fdae
commit 0f5ce3c78c

View File

@ -1580,6 +1580,8 @@ Type
end; end;
{ TJSWindow } { TJSWindow }
TJSDOMHighResTimeStamp = Double;
TFrameRequestCallback = procedure (aTime: TJSDOMHighResTimeStamp);
TJSWindowArray = Array of TJSWindow; TJSWindowArray = Array of TJSWindow;
TJSWindow = class external name 'Window' (TJSObject) TJSWindow = class external name 'Window' (TJSObject)
@ -1689,6 +1691,7 @@ Type
Procedure clearInterval(aID: NativeInt); Procedure clearInterval(aID: NativeInt);
Procedure clearTimeout(aID: NativeInt); Procedure clearTimeout(aID: NativeInt);
Function btoa(Const aValue : string) : string; Function btoa(Const aValue : string) : string;
procedure cancelAnimationFrame(aHandle: Integer);
Procedure close; Procedure close;
Function confirm(Const aMsg : String) : boolean; Function confirm(Const aMsg : String) : boolean;
procedure focus; procedure focus;
@ -1706,6 +1709,7 @@ Type
function prompt(const aMessage,aDefault : String) : String; overload; function prompt(const aMessage,aDefault : String) : String; overload;
procedure removeEventListener(aname : string; aListener : TJSEventHandler); procedure removeEventListener(aname : string; aListener : TJSEventHandler);
procedure removeEventListener(aname : string; aListener : JSValue); procedure removeEventListener(aname : string; aListener : JSValue);
function requestAnimationFrame(aCallback: TFrameRequestCallback): Integer;
procedure resizeBy(aWidth,aHeight : NativeInt); procedure resizeBy(aWidth,aHeight : NativeInt);
procedure resizeTo(aWidth,aHeight : NativeInt); procedure resizeTo(aWidth,aHeight : NativeInt);
procedure scrollBy(x,y : NativeInt); procedure scrollBy(x,y : NativeInt);
@ -1714,7 +1718,7 @@ Type
Function setTimeout(ahandler : TJSTimerCallBack; aTimeout : NativeUInt) : NativeInt; varargs; Function setTimeout(ahandler : TJSTimerCallBack; aTimeout : NativeUInt) : NativeInt; varargs;
Function setTimeout(ahandler : TJSTimerCallBack) : NativeInt; Function setTimeout(ahandler : TJSTimerCallBack) : NativeInt;
procedure stop; procedure stop;
{ public methods }
property console : TJSConsole Read FConsole; property console : TJSConsole Read FConsole;
property closed : boolean read FClosed; property closed : boolean read FClosed;
property crypto : TJSCrypto Read FCrypto; property crypto : TJSCrypto Read FCrypto;