Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Need help on this. I tried registering a handler for the up_button_pressed and down_button_pressed events, but the handler doesn't seem to be passed any arguments.

Is this correct?

    floor.on("up_button_pressed", function(event) { ... } );


I don't think you need an argument. Within the callback function you still hold a reference to floor, and you know the up button has been pressed. There doesn't seem to be any more information. Note that there is also down_button_pressed




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: