[ Index ]
 

Code source de PRADO 3.0.6

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/framework/Web/Javascripts/extended/ -> base.js (source)

   1  
   2  /**
   3   * Similar to bindAsEventLister, but takes additional arguments.
   4   */
   5  Function.prototype.bindEvent = function() 
   6  {
   7      var __method = this, args = $A(arguments), object = args.shift();
   8      return function(event) 
   9      {
  10          return __method.apply(object, [event || window.event].concat(args));
  11      }
  12  }
  13  
  14  /**
  15   * Creates a new function by copying function definition from
  16   * the <tt>base</tt> and optional <tt>definition</tt>.
  17   * @param function a base function to copy from.
  18   * @param array additional definition
  19   * @param function return a new function with definition from both
  20   * <tt>base</tt> and <tt>definition</tt>.
  21   */
  22  Class.extend = function(base, definition)
  23  {
  24          var component = Class.create();
  25          Object.extend(component.prototype, base.prototype);
  26          if(definition) 
  27              Object.extend(component.prototype, definition);
  28          return component;
  29  }


Généré le : Sun Feb 25 21:07:04 2007 par Balluche grâce à PHPXref 0.7