1 // ==========================================================================
  2 // Project:   SproutCore - JavaScript Application Framework
  3 // Copyright: ©2006-2011 Strobe Inc. and contributors.
  4 //            ©2008-2011 Apple Inc. All rights reserved.
  5 // License:   Licensed under MIT license (see license.js)
  6 // ==========================================================================
  7 sc_require("panes/pane");
  8 
  9 SC.Pane.reopen(
 10   /** @scope SC.Pane.prototype */ {
 11 
 12   /**
 13     Inserts the pane's layer as the first child of the passed element.
 14 
 15     @param {DOMElement|jQuery|String} elem the element to prepend the pane's layer to.
 16       This is passed to `jQuery()`, so any value supported by `jQuery()` will work.
 17     @returns {SC.Pane} receiver
 18   */
 19   prependTo: function(elem) {
 20     var self = this;
 21 
 22     return this.insert(function () {
 23       var el = jQuery(elem)[0];
 24       self._doAttach(el, el.firstChild);
 25     });
 26   },
 27 
 28   /**
 29     This method has no effect in the pane.  Instead use remove().
 30 
 31     @returns {void}
 32   */
 33   removeFromParent: function() {
 34     SC.throw("SC.Pane cannot be removed from its parent, since it's the root. Did you mean remove()?");
 35   }
 36 });
 37