You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Andrei Costescu (JIRA)" <ji...@apache.org> on 2013/02/04 16:22:12 UTC
[jira] [Created] (WICKET-5026) [Patch] wicket-event.js defined
Function.prototype.bind doesn't support prepended arguments
Andrei Costescu created WICKET-5026:
---------------------------------------
Summary: [Patch] wicket-event.js defined Function.prototype.bind doesn't support prepended arguments
Key: WICKET-5026
URL: https://issues.apache.org/jira/browse/WICKET-5026
Project: Wicket
Issue Type: Bug
Components: wicket
Affects Versions: 1.5.9
Reporter: Andrei Costescu
As the title says, for Safari, wicket defines Function.prototype.bind (cause the browser doesn't have it).
But it's not compatible to what the other browsers and frameworks offer. Prepending arguments should be allowed.
In Wicket 1.6 I don't know if this is still relevant with the switch to jQuery (which has 'proxy'). The .js at least is no longer there.
Just replace the existing Function.prototype.bind declaration with:
{code}if (Function.prototype.bind == null) {
Function.prototype.bind = function(context) {
var method = this;
var args = Array.prototype.slice.call(arguments, 1);
return function() {
return method.apply(context, args.concat(Array.prototype.slice.call(arguments)));
};
}
}{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira