Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Array#call → Array#invoke

  • Loading branch information...
commit c8bcf5b8b92945ca453c8dca7eef105b90d37ab8 1 parent 3b6a2b2
@subtleGradient subtleGradient authored
View
2  Docs/Types/Array.md
@@ -125,7 +125,7 @@ Returns an array with the named method applied to the array's contents.
### Example:
var foo = [4, 8, 15, 16, 23, 42];
- var bar = foo.call('limit', 10, 30); // bar is now [10, 10, 15, 16, 23, 30]
+ var bar = foo.invoke('limit', 10, 30); // bar is now [10, 10, 15, 16, 23, 30]
View
4 Source/Element/Element.Dimensions.js
@@ -154,7 +154,7 @@ Element.implement({
});
-[Document, Window].call('implement', {
+[Document, Window].invoke('implement', {
getSize: function(){
if (Browser.opera || Browser.safari){
@@ -220,7 +220,7 @@ function getCompatElement(element){
//aliases
Element.alias({setPosition: 'position'}); //compatability
-[Window, Document, Element].call('implement', {
+[Window, Document, Element].invoke('implement', {
getHeight: function(){
return this.getSize().y;
View
2  Source/Element/Element.Event.js
@@ -18,7 +18,7 @@ Element.Properties.events = {set: function(events){
this.addEvents(events);
}};
-[Element, Window, Document].call('implement', {
+[Element, Window, Document].invoke('implement', {
addEvent: function(type, fn){
var events = this.retrieve('events', {});
View
4 Source/Element/Element.js
@@ -199,7 +199,7 @@ Window.implement({
});
-[Document, Element].call('implement', {
+[Document, Element].invoke('implement', {
getElements: function(expression){
return Slick.search(this, expression, new Elements);
@@ -605,7 +605,7 @@ Element.implement({hasChild: function(element){
/*</block>*/
-[Element, Window, Document].call('implement', {
+[Element, Window, Document].invoke('implement', {
addListener: function(type, fn){
if (type == 'unload'){
View
4 Source/Types/Array.js
@@ -16,11 +16,11 @@ provides: Array
Array.implement({
- call: function(name){
+ invoke: function(methodName){
var args = Array.slice(arguments, 1), results = [];
for (var i = 0, j = this.length; i < j; i++){
var item = this[i];
- results.push(item[name].apply(item, args));
+ results.push(item[methodName].apply(item, args));
}
return results;
},
View
2  Source/Utilities/JSON.js
@@ -54,7 +54,7 @@ var JSON = new Hash(this.JSON && {
});
-[Hash, Array, String, Number].call('implement', {
+[Hash, Array, String, Number].invoke('implement', {
toJSON: function(){
return JSON.encode(this);
Please sign in to comment.
Something went wrong with that request. Please try again.