def onBrowserEvent(self, event): type = DOM.eventGetType(event) if type == 'mousedown' or type == 'mouseup' or type == 'mousemove' or type == 'mouseover' or type == 'mouseout': MouseListener.fireMouseEvent(self.mouseListeners, self, event) # stop event falling through esp. for drag on image DOM.eventPreventDefault(event) else: Hyperlink.onBrowserEvent(self, event)