Ticket #243 (new enhancement)
Accept arrays of arguments via rbind
| Reported by: | morten.barklund@… | Owned by: | somebody |
|---|---|---|---|
| Priority: | normal | Milestone: | MochiKit 1.5 |
| Component: | component1 | Version: | |
| Severity: | normal | Keywords: | |
| Cc: |
Description
I would suggest that getElement would support array arguments (arrays of the same plain arguments normally accepted) and return them the same way. This could be done by changing DOM.js from:
getElement: function (id) {
var self = MochiKit.DOM;
if (arguments.length == 1) {
return ((typeof(id) == "string") ?
self._document.getElementById(id) : id);
} else {
return MochiKit.Base.map(self.getElement, arguments);
}
},
to something like:
getElement: function (id) {
var self = MochiKit.DOM;
if (arguments.length == 1) {
if (MochiKit.BASE.isArrayLike(id))
return MochiKit.Base.map(self.getElement, id);
return ((typeof(id) == "string") ?
self._document.getElementById(id) : id);
} else {
return MochiKit.Base.map(self.getElement, arguments);
}
},
(By the way, you forgot to setup your components for trac - the packages would be an obvious choice)
Thanks in advance for a great product.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
