Status: New
Owner: ----
Labels: Type-Defect Priority-Medium Component-Other

New issue 1928 by max99x: Host can't see Function.prototype.length of guest functions.
http://code.google.com/p/google-caja/issues/detail?id=1928

What revision of the cajoler exhibits the problem?  On what browser and OS?
v5678, Chrome 36, Linux, SES mode

What steps will reproduce the problem?
1. In the host define an API method f = function(g) {alert(g.length);}
2. In the client, define function h = function(a, b) {}
3. In the client, call f(h).

What is the expected output? What do you see instead?
I expect "2" to be displayed, as that is the number of arguments declared by the client function, and it's what happens if you perform a similar call purely in the host. In reality, "1" gets displayed, since when the client function is passed through Caja, it gets wrapped in a function that declares a single unused parameter and forwards all arguments using the "arguments" object to the wrapped function.

Please provide any additional information below.


--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--

--- You received this message because you are subscribed to the Google Groups "Google Caja Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to