How to use the pscript.window.document.removeEventListener function in pscript

To help you get started, we’ve selected a few pscript examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github flexxui / flexx / flexx / ui / widgets / _dropdown.py View on Github external
def _collapse_maybe(self, e):
        # Collapse if the given pointer event is outside the combobox.
        # Better version of blur event, sort of. Dont use mouseup, as then
        # there's mouse capturing (the event will come from the main widget).
        t = e.target
        while t is not window.document.body:
            if t is self.outernode:
                return
            t = t.parentElement
        window.document.removeEventListener('mousedown', self._collapse_maybe, 1)
        self._collapse()
github flexxui / flexx / flexx / ui / _widget.py View on Github external
def stopcapture():
            # Stop capturing
            if self._capture_flag == 2:
                self._capture_flag = -1
                window.document.removeEventListener("mousemove", mmove_outside, True)
                window.document.removeEventListener("mouseup", mup_outside, True)
github flexxui / flexx / flexx / ui / _widget.py View on Github external
def stopcapture():
            # Stop capturing
            if self._capture_flag == 2:
                self._capture_flag = -1
                window.document.removeEventListener("mousemove", mmove_outside, True)
                window.document.removeEventListener("mouseup", mup_outside, True)