diff --git a/Docs/Types/Array.md b/Docs/Types/Array.md index aba698d15..db8a802a7 100644 --- a/Docs/Types/Array.md +++ b/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] diff --git a/Source/Element/Element.Dimensions.js b/Source/Element/Element.Dimensions.js index 61cbcefb6..0ad91235f 100644 --- a/Source/Element/Element.Dimensions.js +++ b/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; diff --git a/Source/Element/Element.Event.js b/Source/Element/Element.Event.js index 3e485ad34..57b50fbd0 100644 --- a/Source/Element/Element.Event.js +++ b/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', {}); diff --git a/Source/Element/Element.js b/Source/Element/Element.js index 962e3f21f..312d4e5f6 100644 --- a/Source/Element/Element.js +++ b/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){ /**/ -[Element, Window, Document].call('implement', { +[Element, Window, Document].invoke('implement', { addListener: function(type, fn){ if (type == 'unload'){ diff --git a/Source/Types/Array.js b/Source/Types/Array.js index 05e1f2314..3b69cc244 100644 --- a/Source/Types/Array.js +++ b/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; }, diff --git a/Source/Utilities/JSON.js b/Source/Utilities/JSON.js index 133ae0007..67ed69d70 100644 --- a/Source/Utilities/JSON.js +++ b/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);