Skip to content

Commit

Permalink
Remove Function.prototype.bind since its now native in Chrome
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamedmansour committed Mar 8, 2011
1 parent ab9be16 commit 53d4f29
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
15 changes: 1 addition & 14 deletions js/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,8 @@ String.prototype.trim = function () {
};

/**
* Build own bind function that exposes all functions.
* From Robert Sosinski
* http://www.robertsosinski.com/2009/04/28/binding-scope-in-javascript/
*
* @param {class} scope The class to bind this function to.
* @return {function} The scoped function binded.
* document.createElement Shortcut.
*/
Function.prototype.bind = function(scope) {
var _function = this;
return function() {
return _function.apply(scope, arguments);
}
};


function createElement(tag, opt_attr) {
var elt = document.createElement(tag);
var attr = opt_attr ? opt_attr : {};
Expand Down
3 changes: 2 additions & 1 deletion js/proxy_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ ProxyController = function()
*
* @returns {boolean} true is custom proxy is set and active.
*/
ProxyController.prototype.isProxyActive = function() {
ProxyController.prototype.isProxyActive = function()
{
return this.proxyStatus;
};

Expand Down

0 comments on commit 53d4f29

Please sign in to comment.