mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-04-08 19:47:57 +02:00
* Add EventSource
This commit is contained in:
parent
49edc9d0b0
commit
f5b7651600
@ -1001,6 +1001,24 @@ type
|
||||
property subtle : TJSSubtleCrypto Read Fsubtle;
|
||||
end;
|
||||
|
||||
TJSEventSourceOptions = class external name 'Object' (TJSObject)
|
||||
withCredentials: boolean;
|
||||
end;
|
||||
|
||||
TJSEventSource = class external name 'EventSource' (TJSEventTarget)
|
||||
Private
|
||||
FReadyState : Integer; external name 'readyState';
|
||||
fURL : String; external name 'url';
|
||||
fwithCredentials : Boolean; external name 'withCredentials';
|
||||
Public
|
||||
constructor new(aURL : String);
|
||||
constructor new(aURL : String; options: TJSEventSourceOptions);
|
||||
procedure close;
|
||||
property readyState : Integer Read FReadyState;
|
||||
property url : String Read fURL;
|
||||
property withCredentials: boolean Read FwithCredentials;
|
||||
end;
|
||||
|
||||
|
||||
{ ----------------------------------------------------------------------
|
||||
Service Worker
|
||||
|
Loading…
Reference in New Issue
Block a user