You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2013/02/19 17:03:13 UTC
[jira] [Updated] (WICKET-5026) wicket-event.js defined
Function.prototype.bind doesn't support prepended arguments
[ https://issues.apache.org/jira/browse/WICKET-5026?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Grigorov updated WICKET-5026:
------------------------------------
Summary: wicket-event.js defined Function.prototype.bind doesn't support prepended arguments (was: [Patch] wicket-event.js defined Function.prototype.bind doesn't support prepended arguments)
> 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:JavaScript}
> 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