cam at mcc.id.au
Thu Dec 11 03:00:16 PST 2008
> For example, I'm trying to use JSObjectMakeFunctionWithCallback to
> I'd like to then invoke this function from a script. However, the
> "name" parameter is apparently only "used when converting the function
> to string". The name I give is undefined if I use it in a script.
You’ll need to store that function in a property on the global object.
(When you define a function using ‘function f() …’ at the top level,
this creates a property on the global object named “f”. When your code
calls functions, it looks up the function name as a property on objects
in the scope chain. The scope chain starts off just having the global
object in it, but some other things can add objects on to the chain,
Cameron McCormack ≝ http://mcc.id.au/
More information about the webkit-dev