work on handling JS events and passing them to the window manager