Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

YUI3 Extending Base

By: a guest on Oct 25th, 2012  |  syntax: JavaScript  |  size: 0.29 KB  |  views: 63  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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. });
clone this paste RAW Paste Data