Sha256: d6c22c52810e276cbb179b722d7ecf1cad847d83dfc5f74b846ac0eda80b5da5

Contents?: true

Size: 704 Bytes

Versions: 2

Compression:

Stored size: 704 Bytes

Contents

(function() {

  Support.Observer = function() {};

  // `console` is not defined when the Developer Tools are not open in older
  // versions of Internet Explorer
  function deprecate(message) {
    /* global console */
    if ( console && console.warn ) {
      console.warn(message);
    }
  }

  _.extend(Support.Observer.prototype, {
    bindTo: function(source, event, callback) {
      deprecate("Using #bindTo has been deprecated. Use #listenTo instead.");
      this.listenTo(source, event, callback);
    },

    unbindFromAll: function() {
      deprecate(
        "Using #unbindFromAll has been deprecated. Use #stopListening instead."
      );

      this.stopListening();
    }
  });
})();

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
backbone-support-0.5.1 lib/assets/javascripts/backbone-support/observer.js
backbone-support-0.5.0 lib/assets/javascripts/backbone-support/observer.js