Hello!
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
https://groups.google.com/d/msg/prototype-scriptaculous/-/041-T0uN6m0J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en.