Event listener firing too early when parameters are passed
问题 I pass a number of parameter to a javascript function which builds a form for the user to fill in. Among these parameters are two more functions contained in a separate class which handle the saving or canceling of the form. The cancel function requires two parameters which it uses to determine which list of entities to build. The problem lies in the parameters. While in the form building function, if I attached the cancel function to the newly created cancel button without giving it any