How to use the dom-helpers/events/off function in dom-helpers

To help you get started, we’ve selected a few dom-helpers 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 taion / scroll-behavior / src / ScrollBehavior.js View on Github external
stop() {
    /* istanbul ignore if: not supported by any browsers on Travis */
    if (this._oldScrollRestoration) {
      window.history.scrollRestoration = this._oldScrollRestoration;
    }

    off(window, 'scroll', this._onWindowScroll);
    this._cancelCheckWindowScroll();

    this._unlistenBefore();
  }
github cncjs / cncjs / src / app / components / RootCloseWrapper / RootCloseWrapper.jsx View on Github external
removeEventListeners() {
        const { event } = this.props;
        const doc = ownerDocument(ReactDOM.findDOMNode(this));

        removeEventListener(doc, event, this.handleMouseCapture, true);
        removeEventListener(doc, event, this.handleMouse);
        removeEventListener(doc, 'keyup', this.handleKeyUp);
    }
github alcedo-ui / alcedo-ui / src / _TableContent / TableContent.js View on Github external
componentWillUnmount() {
        eventsOff(window, 'resize', this.debounceFixLayout);
        this.initTimeout && clearTimeout(this.initTimeout);
        this.debounceFixLayout && this.debounceFixLayout.cancel();
    }
github jquense / react-widgets / src / util / dom / animate.js View on Github external
function done(event) {
    if (event.target !== event.currentTarget) return

    fired = true
    off(event.target, transitionProps.end, done)
    css(node, reset)
    callback && callback.call(this)
  }
}
github react-bootstrap / react-overlays / src / utils / addEventListener.js View on Github external
remove() {
      removeEventListener(node, event, handler, capture);
    }
  };