How to use the framebus.off function in framebus

To help you get started, we’ve selected a few framebus 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 braintree / braintree-web / test / lib / unit / bus / bus.js View on Github external
it('doesn\'t proxy to framebus after calling', function () {
      this.bus.teardown();

      this.bus.on(this.event, this.handler);
      expect(framebus.on).not.to.be.called;

      this.bus.off(this.event, this.handler);
      expect(framebus.off).not.to.be.called;

      this.bus.emit(this.event);
      expect(framebus.emit).not.to.be.called;
    });
  });
github braintree / braintree-web / test / lib / unit / bus / bus.js View on Github external
it('proxies to Framebus\'s off', function () {
      this.bus.off(this.event, this.handler);
      expect(framebus.off).to.be.calledWith('braintree:foo:' + this.event, this.handler);
    });
github braintree / braintree-web / src / lib / bus / index.js View on Github external
BraintreeBus.prototype._offDirect = function (eventName) {
  var args = Array.prototype.slice.call(arguments);

  if (this._isDestroyed) { return; }

  args[0] = this._namespaceEvent(eventName);

  this._log('off', args);
  bus.off.apply(bus, args);
};

framebus

Framebus allows you to easily send messages across frames (and iframes) with a simple bus.

MIT
Latest version published 4 months ago

Package Health Score

78 / 100
Full package analysis

Similar packages