forked from 0x2620/oxjs
swap the meaning of makeArray and toArray: makeArray, like makeObject, is a helper function for arguments processing (that wraps any non-array in an array), toArray, like in other libraries, is an alias for Array.prototype.slice.call
This commit is contained in:
parent
5cabb679f9
commit
5692195509
21 changed files with 88 additions and 88 deletions
|
|
@ -107,7 +107,7 @@ Ox.$ = Ox.element = function(val) {
|
|||
@*/
|
||||
append: function() {
|
||||
var that = this;
|
||||
Ox.toArray(arguments[0]).forEach(function(element) {
|
||||
Ox.makeArray(arguments[0]).forEach(function(element) {
|
||||
that[0].appendChild(element[0]);
|
||||
});
|
||||
return this;
|
||||
|
|
@ -254,7 +254,7 @@ Ox.$ = Ox.element = function(val) {
|
|||
key <s> The attribute
|
||||
@*/
|
||||
removeAttr: function() {
|
||||
Ox.toArray(arguments[0]).forEach(function(key) {
|
||||
Ox.makeArray(arguments[0]).forEach(function(key) {
|
||||
this[0].removeAttribute(key);
|
||||
});
|
||||
return this;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue