js/libs/ember-1.5.1.js
function(klass) {
    Ember.deprecate("nearestInstanceOf is deprecated and will be removed from future releases. Use nearestOfType.");
    var view = get(this, 'parentView');

    while (view) {
      if (view instanceof klass) { return view; }
      view = get(view, 'parentView');
    }
  }
function(klass) {
    Ember.deprecate("nearestInstanceOf is deprecated and will be removed from future releases. Use nearestOfType.");
    var view = get(this, 'parentView');

    while (view) {
      if (view instanceof klass) { return view; }
      view = get(view, 'parentView');
    }
  }
function ( klass ) { Ember . deprecate ( "nearestInstanceOf is deprecated and will be removed from future releases. Use nearestOfType." ) ; var view = get ( this , 'parentView' ) ; while ( view ) { if ( view instanceof klass ) { return view ; } view = get ( view , 'parentView' ) ; } }
Return the nearest ancestor that is an instance of the provided
class.

@method nearestInstanceOf
@param {Class} klass Subclass of Ember.View (or Ember.View itself)
@return Ember.View
@deprecated
Return the nearest ancestor that is an instance of the provided class .