mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-04-05 11:17:45 +02:00
* Add overloads for third option in AddEventListener
This commit is contained in:
parent
16cdffe064
commit
488e3b02b5
@ -54,6 +54,7 @@ type
|
||||
TJSNotificationAction = Class;
|
||||
TJSGetNotificationOptions = Class;
|
||||
TJSNotificationEventInit = Class;
|
||||
TJSAbortSignal = class;
|
||||
NotificationPermission = String;
|
||||
NotificationDirection = String;
|
||||
NotificationPermissionCallback = Procedure (permission : NotificationPermission);
|
||||
@ -153,11 +154,24 @@ type
|
||||
TJSEventHandler = reference to function(Event: TJSEvent): boolean; safecall;
|
||||
TJSRawEventHandler = reference to Procedure(Event: TJSEvent); safecall;
|
||||
|
||||
TJSEventListenerOptions = class external name 'Object' (TJSObject)
|
||||
capture : boolean;
|
||||
once : boolean;
|
||||
passive : boolean;
|
||||
signal : TJSAbortSignal;
|
||||
end;
|
||||
|
||||
TJSEventTarget = class external name 'EventTarget' (TJSObject)
|
||||
public
|
||||
procedure addEventListener(aname : string; aListener : TJSEventHandler);
|
||||
procedure addEventListener(aname : string; aListener : TJSRawEventHandler);
|
||||
procedure addEventListener(aname : string; aListener : JSValue);
|
||||
procedure addEventListener(aname : string; aListener : TJSEventHandler; useCapture : Boolean);
|
||||
procedure addEventListener(aname : string; aListener : TJSRawEventHandler; useCapture : Boolean);
|
||||
procedure addEventListener(aname : string; aListener : JSValue; useCapture : Boolean);
|
||||
procedure addEventListener(aname : string; aListener : TJSEventHandler; options : TJSEventListenerOptions);
|
||||
procedure addEventListener(aname : string; aListener : TJSRawEventHandler; options : TJSEventListenerOptions);
|
||||
procedure addEventListener(aname : string; aListener : JSValue; options : TJSEventListenerOptions);
|
||||
function dispatchEvent(event : JSValue) : Boolean;
|
||||
procedure removeEventListener(aname : string; aListener : TJSEventHandler);
|
||||
procedure removeEventListener(aname : string; aListener : TJSRawEventHandler);
|
||||
|
Loading…
Reference in New Issue
Block a user