[Pas2js] is it a bug fro pas2js?
Michael Van Canneyt
michael at freepascal.org
Sat Aug 17 19:20:17 CEST 2019
On Sat, 17 Aug 2019, warleyalex via Pas2js wrote:
> I think the correct TJSEventHandler type definition is:
>
> TJSEventHandler = reference to function(event: TJSEvent): Boolean;
You are right.
And this is in fact the TJSRawEventHandler prototype (barring the boolean
result). The reason was in the confusing documentation about javascript event
handlers.
The best option is probably to redefine TEventListenerEvent = TJSEvent.
That will make both eventhandler types identical, and should remain backwards
compatible.
Michael.
More information about the Pas2js
mailing list