confirm always performs callback

When you use a confirm dialog the callback always gets called even if you press the cancel button.

eg



confirm('Do you really want to quit?', asl.exit);

 

This always quits the app.

 

From the documentation it appears that the callback should only for when you press ok to confirm.

Is this a bug?

 

Is there another way to see which button was pressed?