SHARE
TWEET

YUI3 Extending Base

a guest Oct 25th, 2012 75 Never
  1. YUI().use("base", function(Y) {
  2.  
  3.     function MyClass(config) {
  4.  
  5.         // Invoke Base constructor, passing through arguments
  6.         MyClass.superclass.constructor.apply(this, arguments);
  7.     }
  8.  
  9.     Y.extend(MyClass, Y.Base, {
  10.         // Prototype methods for your new class
  11.     });
  12. });
RAW Paste Data
Top