I need some more ideas how to enumerate all classes - find at runtime (in 
browser) all classes created with Class.create(). My initial approach:

function enumerateClasses() {
  for (var p in window) {
    var c = window[p];
    if (Object.isFunction(c) &&
    !Object.isUndefined(c.superclass) &&
    !Object.isUndefined(c.subclasses) &&
    c.prototype &&
    c.prototype.initialize) {
      console.log(p, c);

but this works only for classes like Hash and Template, and doesn't work 
for classes in a namespace like Ajax.Request.

You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To view this discussion on the web visit 
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to