mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-04-05 13:37:47 +02:00
* Fix event handler signature
This commit is contained in:
parent
1f3db78f37
commit
69ca0ce68a
@ -185,7 +185,7 @@ Var
|
||||
e : TJSElement;
|
||||
|
||||
begin
|
||||
e:=aEvent.target;
|
||||
e:=TJSElement(aEvent.target);
|
||||
While Assigned(e) and Not SameText(e.nodeName,'tr') do
|
||||
e:=e.parentElement;
|
||||
if Not Assigned(E) then exit;
|
||||
|
@ -118,7 +118,7 @@ Var
|
||||
|
||||
begin
|
||||
Result:=true;
|
||||
tid:=aEvent.CurrentTarget.id;
|
||||
tid:=TJSElement(aEvent.CurrentTarget).id;
|
||||
ActivateTab(tid);
|
||||
If (tid='navpdf') then
|
||||
Activate(PPDFOptions)
|
||||
|
@ -61,12 +61,15 @@ Type
|
||||
|
||||
{ TEventListenerEvent }
|
||||
|
||||
TEventListenerEvent = class external name 'EventListener_Event' (TJSObject)
|
||||
(*
|
||||
TEventListenerEvent = class external name 'EventListener_Event' (TJSObject)
|
||||
private
|
||||
FTarget: TJSEventTarget; external name 'target';
|
||||
public
|
||||
Property target: TJSEventTarget Read FTarget;
|
||||
end;
|
||||
*)
|
||||
TEventListenerEvent = TJSEvent;
|
||||
|
||||
TJSEventHandler = reference to function(Event: TEventListenerEvent): boolean;
|
||||
TJSRawEventHandler = reference to Procedure(Event: TJSEvent);
|
||||
@ -426,10 +429,12 @@ Type
|
||||
FBubbles : Boolean; external name 'bubbles';
|
||||
FCancelable : Boolean; external name 'cancelable';
|
||||
FComposed : Boolean; external name 'composed';
|
||||
FCurrentTarget : TJSElement; external name 'currentTarget';
|
||||
FCurrentTarget : TJSEventTarget; external name 'currentTarget';
|
||||
FCurrentTargetElement : TJSElement; external name 'currentTarget';
|
||||
FdefaultPrevented : Boolean; external name 'defaultPrevented';
|
||||
FEventPhase : NativeInt; external name 'eventPhase';
|
||||
FTarget : TJSElement; external name 'target';
|
||||
FTarget : TJSEventTarget; external name 'target';
|
||||
FTargetElement : TJSElement; external name 'target';
|
||||
FTimeStamp : NativeInt; external name 'timestamp';
|
||||
FType : String; external name 'type';
|
||||
FIsTrusted : Boolean; external name 'isTrusted';
|
||||
@ -449,10 +454,12 @@ Type
|
||||
Property bubbles : Boolean Read FBubbles;
|
||||
Property cancelable : Boolean Read FCancelable;
|
||||
Property composed : Boolean Read FComposed;
|
||||
property currentTarget : TJSElement Read FCurrentTarget;
|
||||
property currentTarget : TJSEventTarget Read FCurrentTarget;
|
||||
property currentTargetElement : TJSElement Read FCurrentTargetElement;
|
||||
property defaultPrevented : Boolean Read FdefaultPrevented;
|
||||
property eventPhase : NativeInt Read FEventPhase;
|
||||
property target : TJSElement Read FTarget;
|
||||
property target : TJSEventTarget Read FTarget;
|
||||
property targetElement : TJSElement Read FTargetElement;
|
||||
Property timestamp : NativeInt Read FTimeStamp;
|
||||
property _type : string read FType;
|
||||
property isTrusted : Boolean Read FIsTrusted;
|
||||
|
Loading…
Reference in New Issue
Block a user