mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-06 17:12:50 +00:00
Fix #1184: Add missing argument to .apply()
The Javascript .apply() method takes two arguments: A context argument and an array of values. In CPWebScriptObject callWebScriptMethod:withArguments, only an array of arguments was passed to the .apply() method. This fix inserts `this` as the first argument, and the array of arguments as the second. This has been converted to a pull request from the original issue (#1184) The original issue also suggested a fix for handling namespaces, which are not incorporated in this patch.
This commit is contained in:
1 parent
ae2ed8bf94
commit
ee20038dce
1 file changed
+1
-1
+1
-1
@@ -962,7 +962,7 @@ CPWebViewAppKitScrollMaxPollCount = 3;
|
||||
{
|
||||
try
|
||||
{
|
||||
return _window[methodName].apply(args);
|
||||
return _window[methodName].apply(this, args);
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user