Hello friends, is there any way in release mode to call procedures and functions to work more or less like this pas.Unit1.Form1.Form1DOMContentLoaded(self); ?
Do you have more details on what exactly you want to do?
How does release or debug mode make a difference to what you want to do?
It is most likely the optimizer that removes this code as it thinks it is not used.
Try to add somewhere a (pseudo) Object Pascal code call to this function and the optimizer should keep it.
if (1<0) then
Thanks Bruno, everything worked out that way. Will it be possible in the future not to have to use this artifice?
A maybe easier alternative could be some attribute on methods that instruct the compiler to not optimize code away.
We'll discuss this with the pas2js team
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.