Problem
I use a leaflet for my application, and the delete button is active for me. The delete button has three options:
I want the function to be foo()called if the user clicks Save, however I want the function to be bar()called if they click Cancel.
Live demo
Decision
I know that this could be achieved simply by giving it an identifier and adding an event listener, but this is not as clean as I think it should be.
The perfect solution
The flyer uses its own methods for determining button presses, but it seems to me that they only do this one level higher. For instance:
draw:deletestop . : , ( ) .
-
foo() , , , .
, , .