mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-09-05 22:10:13 +02:00
* Extendable event etc
This commit is contained in:
parent
940ed2537d
commit
a5286f1dbc
@ -49,6 +49,8 @@ Type
|
||||
TJSFileSystemDirectoryHandleArray = array of TJSFileSystemDirectoryHandle;
|
||||
TJSShowOpenFilePickerOptions = class;
|
||||
TJSShowSaveFilePickerOptions = class;
|
||||
TJSServiceWorker = class;
|
||||
TJSClient = class;
|
||||
|
||||
{ TEventListenerEvent }
|
||||
|
||||
@ -1718,6 +1720,7 @@ TEventListenerEvent = class external name 'EventListener_Event' (TJSObject)
|
||||
procedure postMessage(aValue : JSValue; aList : TJSValueDynArray);
|
||||
procedure start;
|
||||
end;
|
||||
TJSMessagePortDynArray = Array of TJSMessagePort;
|
||||
|
||||
{ TJSSharedWorker }
|
||||
|
||||
@ -1730,6 +1733,51 @@ TEventListenerEvent = class external name 'EventListener_Event' (TJSObject)
|
||||
property port : TJSMessagePort Read FPort;
|
||||
end;
|
||||
|
||||
TJSExtendableEvent = class external name 'ExtendableEvent' (TJSEvent)
|
||||
Procedure waitUntil(aPromise : TJSPromise);
|
||||
end;
|
||||
|
||||
{ TJSExtendableMessageEvent }
|
||||
|
||||
TJSExtendableMessageEvent = class external name 'ExtendableMessageEvent' (TJSExtendableEvent)
|
||||
private
|
||||
FData: JSValue; external name 'data';
|
||||
FLastEventID: String; external name 'lastEventId';
|
||||
FOrigin: String; external name 'origin';
|
||||
FPorts: TJSMessagePortDynArray; external name 'ports';
|
||||
FSource: TJSObject; external name 'source';
|
||||
FSourceClient: TJSClient; external name 'source';
|
||||
FSourcePort: TJSMessagePort; external name 'source';
|
||||
FSourceServiceWorker: TJSServiceWorker; external name 'source';
|
||||
Public
|
||||
Property Data : JSValue Read FData;
|
||||
Property LastEventID : String Read FLastEventID;
|
||||
Property Origin : String Read FOrigin;
|
||||
Property Ports : TJSMessagePortDynArray Read FPorts;
|
||||
Property Source : TJSObject Read FSource;
|
||||
// Possible types for Source
|
||||
Property SourceServiceWorker : TJSServiceWorker Read FSourceServiceWorker;
|
||||
Property SourcePort : TJSMessagePort Read FSourcePort;
|
||||
Property SourceClient : TJSClient Read FSourceClient;
|
||||
end;
|
||||
|
||||
{ TJSClient }
|
||||
|
||||
TJSClient = class external name 'Client' (TJSObject)
|
||||
private
|
||||
FFrameType: String; external name 'frameType';
|
||||
FID: String; external name 'id';
|
||||
FType: String; external name 'type';
|
||||
FURL: String; external name 'url';
|
||||
Public
|
||||
procedure postMessage(aValue : JSValue);
|
||||
procedure postMessage(aValue : JSValue; aList : TJSValueDynArray);
|
||||
Property Id : String Read FID;
|
||||
Property Type_ : String Read FType;
|
||||
Property FrameType : String Read FFrameType;
|
||||
Property URL : String Read FURL;
|
||||
end;
|
||||
|
||||
{ TJSServiceWorker }
|
||||
|
||||
TJSServiceWorker = class external name 'ServiceWorker' (TJSWorker)
|
||||
|
Loading…
Reference in New Issue
Block a user