code: def js_on_click(self, handler):
          ''' Set up a JavaScript handler for button or menu item clicks. '''
          self.js_on_event(ButtonClick, handler)
          self.js_on_event(MenuItemClick, handlerf js_on_click(self, handler):
          ''' Set up a JavaScript handler for button or menu item clicks. '''
          self.js_on_event(ButtonClick, handler)
          self.js_on_event(MenuItemClick, handler)
docs: Set up a JavaScript handler for button or menu item clicks.