On Wed, 17 Jul 2019, Simon Ameis wrote:
Hello all, How do I register a Pascal method as callback function for an jQuery Mobile callback? In JavaScript I can use this syntax: $("#elementid").on("pagehide", function(event, ui){ alert("Event fired");}); Is there any method to do this in Pascal without creating an external class for the jQuery object $("#elementid")?
Several ways, but TJSOBject(JQuery('#elementid'))['onhide']:=@yourfunction;
should work. Michael. _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal