All good additions, Ken. Regarding Enumerables, we were actually considering a late-bound mixin implementation. If we were to use such pattern, any objects that mix Enumerable in, would automagically have methods that are added to Enumerable later on. That would obviously work for any other mixin as well.
I made a Class additions draft some time ago: - Static methods should allow inheritance (Class.extend (?)) - Mixin methods should allow inheritance (Class.include (?)) - Object.isClass - Callbacks (object:initialized, method:added, method:inherited, etc.) - Context-safe constructors. new Person() === Person(); (turn on/off: Class.CONTEXT_SAFE = true) - Sugar: Class.getInstanceMethods (Object.keys of constructor.prototype), Class.getClassMethods (Object.keys of constructor) - Late bound mixin methods (maybe to be able to specify early/late when adding) -- kangax On Jul 3, 12:31 am, "Ken Snyder" <[EMAIL PROTECTED]> wrote: > Yes, those escapeHTML fixes are what I was thinking. > > I'm excited to see Event delegation! > > Also, I wanted to suggest some more ways to extend and customize Prototype: > > *Event.addMethods* to allow adding methods to Event instances > (http://prototype.lighthouseapp.com/projects/8886-prototype/tickets/203) > > *Class.addMethods* to allow adding methods to every class instance for > classes created with Class.create() (http://dev.rubyonrails.org/ticket/10089 > ) > > *Enumerable.addMethods* as a quick way to add methods to all enumerables: > > Enumerable.addMethods = function(methods) { > Hash.addMethods(methods); > ObjectRange.addMethods(methods); > Object.extend(Ajax.Responders, methods); > Object.extend(Array.prototype, methods); > Element.ClassNames.addMethods(methods); // i think this is deprecated now > > }; > > - Ken --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype: Core" group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en -~----------~----~----~----~------~----~------~--~---